this is obsolete doc -- see instead

Setting up Nagios 

(out of date) 



Make sure the time is up-to-date, 

vi /etc/ntp.conf
server your_ntp_server
reload the service



Install those packages, 

yum install gcc httpd gd gd-devel perl make net-snmp-perl

Note net-snmp-perl is needed for nagios plugins. Not sure about this one, 

yum install net-snmp-devel

To run Checkinstall to make RPMs out of your nagios install, those packages are also needed, 

yum install which rpmbuild

Get Checkinstall from 

Note the resulting RPMs are located in /usr/src, 

ls -l /usr/src/redhat/RPMS/i386


Prepare the groups & users, 

useradd nagios
passwd nagios
groupadd nagcmd
usermod -G nagcmd nagios
usermod -G nagcmd apache


Get Nagios 3 from and, 

tar xvzf nagios-3*.tar.gz
cd nagios-3*
./configure --with-command-group=nagcmd
make all
checkinstall --pkgname=nagios-init make install-init
checkinstall --pkgname=nagios-config make install-config
checkinstall --pkgname=nagios-commandmode make install-commandmode
rpm -ivh /usr/src/redhat/RPMS/i386/nagios-*.rpm
vi /usr/local/nagios/etc/objects/contacts.cfg
checkinstall --pkgname=nagios-webconf make install-webconf
rpm -ivh /usr/src/redhat/RPMS/i386/nagios-webconf*.rpm
service httpd reload



Get Nagios-plugins and install it (Checkinstall fails), 

./configure --with-nagios-user=nagios --with-nagios-group=nagios
make install


Postinstall fix, 

cd /usr/local/nagios/var
mkdir rw
chown nagios:nagcmd rw
chmod g+s rw
service nagios start


Eventually change the side menu colors, 




SNMP tips 

Some usefull plugin commands, 

./ -H IP -p PORT -C public -w
./check_snmp -H IP -o OID -p PORT

Note. the mentioned .pl plugin needs latest Net::SNMP ask for method "session" 

perl -e
make test
make install


Some usefull tools to make your own SNMP plugin, 

snmpwalk -r3 -v1 -c public IP:PORT -On
snmpget -r3 -v1 -c public IP:PORT OID

Note. OID start with a dot 

Note. default port is 161 (and 162 for snmptrapd) but checkpoint firewall spit on 260, beside the plaform (snmpd running on linux) default snmp which also runs on it. 

Note. snmpwalk doesn't see all the OIDS, you need to check the OID (*precisely*) by yourself using e.g. windows Getif . 

Note. double check the ending of the OID, .0 .1 or .2 is often needs to be added manually at the end when copy/pasting the OID getif displays) 

Note. to authenticate w/ snmpv3, 

snmpget -r3 -v3 -u LOGIN -A PASSWORD -l authNoPriv



MIB hints 

Locate RFC ==> you will find the dir where all MIBs are in. 

Put your MIb into it and append -m ALL to the snmpget & snmpwalk command lines. 



Windows hint 

Use NRPE (2.6 



Firefox plugin