I was trying to install Nagios on CentOS 6.2 by following the below link and having few errors at the "Install Nagios" section in the website, could you please let me know how to get rid of it and successfully install.
I have pasted the link as well as system specifications along with error messages.
[root@nagiospoc nagios-3.2.0]# uname -a
Linux nagiospoc 2.6.32-220.2.1.el6.x86_64 #1 SMP Fri Dec 23 02:21:33 CST 2011 x86_64 x86_64 x86_64 GNU/Linux
[root@nagiospoc nagios-3.2.0]# cat /etc/redhat-release
CentOS release 6.2 (Final)
[root@nagiospoc nagios-3.2.0]# make all
cd ./base && make
make[1]: Entering directory `/root/nagios-3.2.0/base'
gcc -g -O2 -DHAVE_CONFIG_H -DNSCORE -c -o checks.o checks.c
In file included from checks.c:40:
../include/epn_nagios.h:11:20: error: EXTERN.h: No such file or directory
../include/epn_nagios.h:12:18: error: perl.h: No such file or directory
In file included from checks.c:40:
../include/epn_nagios.h:31: error: expected �=�, �,�, �;�, �asm� or �__attribute__� before �void�
checks.c: In function �run_async_service_check�:
checks.c:356: error: �SV� undeclared (first use in this function)
checks.c:356: error: (Each undeclared identifier is reported only once
checks.c:356: error: for each function it appears in.)
checks.c:356: error: �plugin_hndlr_cr� undeclared (first use in this function)
checks.c:357: error: �STRLEN� undeclared (first use in this function)
checks.c:357: error: expected �;� before �n_a�
checks.c:363: error: �dSP� undeclared (first use in this function)
checks.c:557: error: �ENTER� undeclared (first use in this function)
checks.c:558: error: �SAVETMPS� undeclared (first use in this function)
checks.c:559: error: �SP� undeclared (first use in this function)
checks.c:564: error: �PUTBACK� undeclared (first use in this function)
checks.c:568: error: �G_SCALAR� undeclared (first use in this function)
checks.c:568: error: �G_EVAL� undeclared (first use in this function)
checks.c:570: error: �SPAGAIN� undeclared (first use in this function)
checks.c:572: error: �ERRSV� undeclared (first use in this function)
checks.c:581: error: �POPs� undeclared (first use in this function)
checks.c:634: error: �FREETMPS� undeclared (first use in this function)
checks.c:635: error: �LEAVE� undeclared (first use in this function)
checks.c:713: error: �G_ARRAY� undeclared (first use in this function)
checks.c:717: error: �POPpx� undeclared (first use in this function)
checks.c:718: error: �POPi� undeclared (first use in this function)
make[1]: *** [checks.o] Error 1
make[1]: Leaving directory `/root/nagios-3.2.0/base'
make: *** [all] Error 2
You should mount the DVD or ISO that you installed from as a yum repository and not do this from random packages (I have not and cannot view your link from work).
Then you can use yum to install the kernel headers that you need.
updates: mirror.team-cymru.org
Setting up Install Process
Examining /mnt/Packages/kernel-devel-2.6.32-71.el6.x86_64.rpm: kernel-devel-2.6.32-71.el6.x86_64
Marking /mnt/Packages/kernel-devel-2.6.32-71.el6.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package kernel-devel.x86_64 0:2.6.32-71.el6 set to be installed
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================================
Package Arch Version Repository Size
Installing:
kernel-devel x86_64 2.6.32-71.el6 /kernel-devel-2.6.32-71.el6.x86_64 22 M
Transaction Summary
Install 1 Package(s)
Upgrade 0 Package(s)
Total size: 22 M
Installed size: 22 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : kernel-devel-2.6.32-71.el6.x86_64 1/1
updates: mirror.team-cymru.org
Setting up Install Process
Examining /mnt/Packages/kernel-headers-2.6.32-71.el6.x86_64.rpm: kernel-headers-2.6.32-71.el6.x86_64
/mnt/Packages/kernel-headers-2.6.32-71.el6.x86_64.rpm: does not update installed package.
Error: Nothing to do
[root@nagiospoc Packages]# yum install /mnt/Packages/kernel-2.6.32-71.el6.x86_64.rpm
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
updates: mirror.team-cymru.org
Setting up Install Process
Examining /mnt/Packages/kernel-2.6.32-71.el6.x86_64.rpm: kernel-2.6.32-71.el6.x86_64
/mnt/Packages/kernel-2.6.32-71.el6.x86_64.rpm: does not update installed package.
Error: Nothing to do
[root@nagiospoc Packages]# rpm -ivh /mnt/Packages/kernel-headers-2.6.32-71.el6.x86_64.rpm
Preparing... ########################################### [100%]
package kernel-headers-2.6.32-220.2.1.el6.x86_64 (which is newer than kernel-headers-2.6.32-71.el6.x86_64) is already installed
file /usr/include/asm-generic/errno.h from install of kernel-headers-2.6.32-71.el6.x86_64 conflicts with file from package kernel-headers-2.6.32-220.2.1.el6.x86_64
file /usr/include/linux/fcntl.h from install of kernel-headers-2.6.32-71.el6.x86_64 conflicts with file from package kernel-headers-2.6.32-220.2.1.el6.x86_64
file /usr/include/asm-generic/statfs.h from install of kernel-headers-2.6.32-71.el6.x86_64 conflicts with file from package kernel-headers-2.6.32-220.2.1.el6.x86_64
file /usr/include/linux/termios.h from install of kernel-headers-2.6.32-71.el6.x86_64 conflicts with file from package kernel-headers-2.6.32-220.2.1.el6.x86_64
file /usr/include/asm-generic/unistd.h from install of kernel-headers-2.6.32-71.el6.x86_64 conflicts with file from package kernel-headers-2.6.32-220.2.1.el6.x86_64
file /usr/include/asm/e820.h from install of kernel-headers-2.6.32-71.el6.x86_64 conflicts with file from package kernel-headers-2.6.32-220.2.1.el6.x86_64
file /usr/include/asm/kvm.h from install of kernel-headers-2.6.32-71.el6.x86_64 conflicts with file from package kernel-headers-2.6.32-220.2.1.el6.x86_64
file /usr/include/linux/kvm.h from install of kernel-headers-2.6.32-71.el6.x86_64 conflicts with file from package kernel-headers-2.6.32-220.2.1.el6.x86_64
file /usr/include/asm/msr-index.h from install of kernel-headers-2.6.32-71.el6.x86_64 conflicts with file from package kernel-headers-2.6.32-220.2.1.el6.x86_64
file /usr/include/asm/processor-flags.h from install of kernel-headers-2.6.32-71.el6.x86_64 conflicts with file from package kernel-headers-2.6.32-220.2.1.el6.x86_64
file /usr/include/asm/unistd_32.h from install of kernel-headers-2.6.32-71.el6.x86_64 conflicts with file from package kernel-headers-2.6.32-220.2.1.el6.x86_64
file /usr/include/asm/unistd_64.h from install of kernel-headers-2.6.32-71.el6.x86_64 conflicts with file from package kernel-headers-2.6.32-220.2.1.el6.x86_64
file /usr/include/drm/drm.h from install of kernel-headers-2.6.32-71.el6.x86_64 conflicts with file from package kernel-headers-2.6.32-220.2.1.el6.x86_64
file /usr/include/drm/drm_mode.h from install of kernel-headers-2.6.32-71.el6.x86_64 conflicts with file from package kernel-headers-2.6.32-220.2.1.el6.x86_64
file /usr/include/drm/i915_drm.h from install of kernel-headers-2.6.32-71.el6.x86_64 conflicts with file from package kernel-headers-2.6.32-220.2.1.el6.x86_64
file /usr/include/drm/mga_drm.h from install of kernel-headers-2.6.32-71.el6.x86_64 conflicts with file from package kernel-headers-2.6.32-220.2.1.el6.x86_64
file /usr/include/drm/nouveau_drm.h from install of kernel-headers-2.6.32-71.el6.x86_64 conflicts with file from package kernel-headers-2.6.32-220.2.1.el6.x86_64
file /usr/include/drm/radeon_drm.h from install of kernel-headers-2.6.32-71.el6.x86_64 conflicts with file from package kernel-headers-2.6.32-220.2.1.el6.x86_64
file /usr/include/drm/savage_drm.h from install of kernel-headers-2.6.32-71.el6.x86_64 conflicts with file from package kernel-headers-2.6.32-220.2.1.el6.x86_64
file /usr/include/drm/via_drm.h from install of kernel-headers-2.6.32-71.el6.x86_64 conflicts with file from package kernel-headers-2.6.32-220.2.1.el6.x86_64
file /usr/include/linux/audit.h from install of kernel-headers-2.6.32-71.el6.x86_64 conflicts with file from package kernel-headers-2.6.32-220.2.1.el6.x86_64
file /usr/include/linux/auto_fs4.h from install of kernel-headers-2.6.32-71.el6.x86_64 conflicts with file from package kernel-headers-2.6.32-220.2.1.el6.x86_64
file /usr/include/linux/blktrace_api.h from install of kernel-headers-2.6.32-71.el6.x86_64 conflicts with file from package kernel-headers-2.6.32-220.2.1.el6.x86_64
file /usr/include/linux/netlink.h from install of kernel-headers-2.6.32-71.el6.x86_64 conflicts with file from package kernel-headers-2.6.32-220.2.1.el6.x86_64
file /usr/include/linux/dcbnl.h from install of kernel-headers-2.6.32-71.el6.x86_64 conflicts with file from package kernel-headers-2.6.32-220.2.1.el6.x86_64
file /usr/include/linux/dlm.h from install of kernel-headers-2.6.32-71.el6.x86_64 conflicts with file from package kernel-headers-2.6.32-220.2.1.el6.x86_64
file /usr/include/linux/dlm_plock.h from install of kernel-headers-2.6.32-71.el6.x86_64 conflicts with file from package kernel-headers-2.6.32-220.2.1.el6.x86_64
file /usr/include/linux/dm-ioctl.h from install of kernel-headers-2.6.32-71.el6.x86_64 conflicts with file from package kernel-headers-2.6.32-220.2.1.el6.x86_64
file /usr/include/linux/dm-log-userspace.h from install of kernel-headers-2.6.32-71.el6.x86_64 conflicts with file from package kernel-headers-2.6.32-220.2.1.el6.x86_64
file /usr/include/linux/dqblk_xfs.h from install of kernel-headers-2.6.32-71.el6.x86_64 conflicts with file from package kernel-headers-2.6.32-220.2.1.el6.x86_64
file /usr/include/linux/dvb/frontend.h from install of kernel-headers-2.6.32-71.el6.x86_64 conflicts with file from package kernel-headers-2.6.32-220.2.1.el6.x86_64
file /usr/include/linux/net.h from install of kernel-headers-2.6.32-71.el6.x86_64 conflicts with file from package kernel-headers-2.6.32-220.2.1.el6.x86_64
file /usr/include/linux/dvb/version.h from install of kernel-headers-2.6.32-71.el6.x86_64 conflicts with file from package kernel-headers-2.6.32-220.2.1.el6.x86_64
file /usr/include/linux/version.h from install of kernel-headers-2.6.32-71.el6.x86_64 conflicts with file from package kernel-headers-2.6.32-220.2.1.el6.x86_64
file /usr/include/linux/elf.h from install of kernel-headers-2.6.32-71.el6.x86_64 conflicts with file from package kernel-headers-2.6.32-220.2.1.el6.x86_64
file /usr/include/linux/ethtool.h from install of kernel-headers-2.6.32-71.el6.x86_64 conflicts with file from package kernel-headers-2.6.32-220.2.1.el6.x86_64
file /usr/include/linux/fb.h from install of kernel-headers-2.6.32-71.el6.x86_64 conflicts with file from package kernel-headers-2.6.32-220.2.1.el6.x86_64
file /usr/include/linux/fs.h from install of kernel-headers-2.6.32-71.el6.x86_64 conflicts with file from package kernel-headers-2.6.32-220.2.1.el6.x86_64
file /usr/include/linux/gfs2_ondisk.h from install of kernel-headers-2.6.32-71.el6.x86_64 conflicts with file from package kernel-headers-2.6.32-220.2.1.el6.x86_64
file /usr/include/linux/if.h from install of kernel-headers-2.6.32-71.el6.x86_64 conflicts with file from package kernel-headers-2.6.32-220.2.1.el6.x86_64
file /usr/include/linux/if_bonding.h from install of kernel-headers-2.6.32-71.el6.x86_64 conflicts with file from package kernel-headers-2.6.32-220.2.1.el6.x86_64
file /usr/include/linux/if_ether.h from install of kernel-headers-2.6.32-71.el6.x86_64 conflicts with file from package kernel-headers-2.6.32-220.2.1.el6.x86_64
file /usr/include/linux/if_link.h from install of kernel-headers-2.6.32-71.el6.x86_64 conflicts with file from package kernel-headers-2.6.32-220.2.1.el6.x86_64
file /usr/include/linux/if_packet.h from install of kernel-headers-2.6.32-71.el6.x86_64 conflicts with file from package kernel-headers-2.6.32-220.2.1.el6.x86_64
file /usr/include/linux/if_tun.h from install of kernel-headers-2.6.32-71.el6.x86_64 conflicts with file from package kernel-headers-2.6.32-220.2.1.el6.x86_64
file /usr/include/linux/in6.h from install of kernel-headers-2.6.32-71.el6.x86_64 conflicts with file from package kernel-headers-2.6.32-220.2.1.el6.x86_64
file /usr/include/linux/input.h from install of kernel-headers-2.6.32-71.el6.x86_64 conflicts with file from package kernel-headers-2.6.32-220.2.1.el6.x86_64
file /usr/include/linux/ivtvfb.h from install of kernel-headers-2.6.32-71.el6.x86_64 conflicts with file from package kernel-headers-2.6.32-220.2.1.el6.x86_64
file /usr/include/linux/kernel.h from install of kernel-headers-2.6.32-71.el6.x86_64 conflicts with file from package kernel-headers-2.6.32-220.2.1.el6.x86_64
file /usr/include/linux/magic.h from install of kernel-headers-2.6.32-71.el6.x86_64 conflicts with file from package kernel-headers-2.6.32-220.2.1.el6.x86_64
file /usr/include/linux/mempolicy.h from install of kernel-headers-2.6.32-71.el6.x86_64 conflicts with file from package kernel-headers-2.6.32-220.2.1.el6.x86_64
file /usr/include/linux/netfilter.h from install of kernel-headers-2.6.32-71.el6.x86_64 conflicts with file from package kernel-headers-2.6.32-220.2.1.el6.x86_64
file /usr/include/linux/netfilter/nfnetlink.h from install of kernel-headers-2.6.32-71.el6.x86_64 conflicts with file from package kernel-headers-2.6.32-220.2.1.el6.x86_64
file /usr/include/linux/netfilter/xt_TPROXY.h from install of kernel-headers-2.6.32-71.el6.x86_64 conflicts with file from package kernel-headers-2.6.32-220.2.1.el6.x86_64
file /usr/include/linux/nfs4.h from install of kernel-headers-2.6.32-71.el6.x86_64 conflicts with file from package kernel-headers-2.6.32-220.2.1.el6.x86_64
file /usr/include/linux/nfs_fs.h from install of kernel-headers-2.6.32-71.el6.x86_64 conflicts with file from package kernel-headers-2.6.32-220.2.1.el6.x86_64
file /usr/include/linux/nfs_mount.h from install of kernel-headers-2.6.32-71.el6.x86_64 conflicts with file from package kernel-headers-2.6.32-220.2.1.el6.x86_64
file /usr/include/linux/oom.h from install of kernel-headers-2.6.32-71.el6.x86_64 conflicts with file from package kernel-headers-2.6.32-220.2.1.el6.x86_64
file /usr/include/linux/pci_regs.h from install of kernel-headers-2.6.32-71.el6.x86_64 conflicts with file from package kernel-headers-2.6.32-220.2.1.el6.x86_64
file /usr/include/linux/perf_event.h from install of kernel-headers-2.6.32-71.el6.x86_64 conflicts with file from package kernel-headers-2.6.32-220.2.1.el6.x86_64
file /usr/include/linux/random.h from install of kernel-headers-2.6.32-71.el6.x86_64 conflicts with file from package kernel-headers-2.6.32-220.2.1.el6.x86_64
file /usr/include/linux/rtnetlink.h from install of kernel-headers-2.6.32-71.el6.x86_64 conflicts with file from package kernel-headers-2.6.32-220.2.1.el6.x86_64
file /usr/include/linux/signalfd.h from install of kernel-headers-2.6.32-71.el6.x86_64 conflicts with file from package kernel-headers-2.6.32-220.2.1.el6.x86_64
file /usr/include/linux/tcp.h from install of kernel-headers-2.6.32-71.el6.x86_64 conflicts with file from package kernel-headers-2.6.32-220.2.1.el6.x86_64
file /usr/include/linux/usb/ch9.h from install of kernel-headers-2.6.32-71.el6.x86_64 conflicts with file from package kernel-headers-2.6.32-220.2.1.el6.x86_64
file /usr/include/linux/videodev2.h from install of kernel-headers-2.6.32-71.el6.x86_64 conflicts with file from package kernel-headers-2.6.32-220.2.1.el6.x86_64
file /usr/include/linux/virtio_blk.h from install of kernel-headers-2.6.32-71.el6.x86_64 conflicts with file from package kernel-headers-2.6.32-220.2.1.el6.x86_64
file /usr/include/linux/virtio_net.h from install of kernel-headers-2.6.32-71.el6.x86_64 conflicts with file from package kernel-headers-2.6.32-220.2.1.el6.x86_64
file /usr/include/linux/virtio_ring.h from install of kernel-headers-2.6.32-71.el6.x86_64 conflicts with file from package kernel-headers-2.6.32-220.2.1.el6.x86_64
[root@nagiospoc Packages]# rpm -q kernel-2.6.32-71.el6.x86_64.rpm
package kernel-2.6.32-71.el6.x86_64.rpm is not installed
[root@nagiospoc Packages]# rpm -q kernel-devel-2.6.32-71.el6.x86_64.rpm
package kernel-devel-2.6.32-71.el6.x86_64.rpm is not installed
[root@nagiospoc Packages]# rpm -q kernel-headers-2.6.32-71.el6.x86_64.rpm
package kernel-headers-2.6.32-71.el6.x86_64.rpm is not installed
The kernel you have is not the one from the DVD. If you have updated via an online repository then you should just use yum to install it from that repository. Don't specify a version
I finally did install Nagios 3.2.3 on CentOS release 5.7 (Final) with the default config files and added 1 host to it and it is sending "Service Alert: CentOS 5/HTTP is WARNING" frequently, how do you fix this one? what are the additional files that need to be added so that I can monitor the diskspace, desired processes, network interfaces, users, load, cpu usage etc. Are there any additional files that need to be edited?
At this point, you are no longer asking how to install Nagios, but how to use it. Perhaps a class or a book would be better. Implementing a monitoring system you know nothing about does you no good.
This a POC Mark and an entirely new build completely isolated from existing network and we have just the DEV machines at the moment, eventually we will get to SIT/STAGING & PROD I haven't built Nagios prior to this and need to know what are the files that need to be taken care of.
I have installed nagios and added 12 hosts as a start and monitoring few details on them, how do I send false alerts and check if they are being reported through nagios server?
Also, Nagios seems to be sending false alerts about few hosts, (ex: There were no users on one host and still Nagios was reporting a critical alert and says 6 users are logged in.
I can repeat myself, but I do not think that will do any good. Please go find a book on Nagios. I do not run Nagios. Your original question was regarding how to install an application.
Find more information on Nagios from their website or one of dozens of good books on amazon.
This tool is way too large and encompassing for you to come ask every possible question in this thread.