Nagios
Nagios is main monitoring tool for CLON cluster.
Download from web following files and place them to '/usr/local/downloads':
nagios-2.6.tar.gz nagios-images_0.3.tar.gz nagios-plugins-1.4.5.tar.gz nagiosmib-1.0.0.tar.gz (?????????)
create user 'nagios', private group 'nagios' mkdir /www/nagios2.6 chown nagios.nagios /www/nagios2.6
Add command file group and put appropriate users in (we assume that apache is running as user 'apache'):
/usr/sbin/groupadd nagcmd /usr/sbin/usermod -G nagcmd apache /usr/sbin/usermod -G nagcmd nagios to check, see file /etc/group
Build and install:
cp /usr/local/downloads/nagios-2.6.tar.gz /usr/local/src cd /usr/local/src gunzip nagios-2.6.tar.gz tar xvf nagios-2.6.tar cd '/usr/local/src/nagios-2.6' su nagios ./configure --prefix=/www/nagios2.6 --with-cgiurl=/nagios/cgi-bin --with-htmurl=/nagios --with-nagios-user=nagios --with-nagios-group=nagios --with-command-group=nagcmd make all make install
Install init script /etc/init.d/nagios:
make install-init (as 'root' !!!)
Modify /etc/init.d/nagios script as following (bug ?):
###NagiosRunFile=${prefix}/var/nagios.lock NagiosRunFile=${prefix}/var/run/nagios.pid
#to install sample /etc directory make install-config
#???This installs and configures permissions on the #???directory for holding the external command file make install-commandmode
Plugins:
cd /usr/local/src/nagios-plugins-1.4.5 su nagios ./configure --prefix=/www/nagios2.6 make make install
Extra plagins (nrpe):
cd /usr/local/src/nrpe-2.6 ./configure make all cp src/check_nrpe /www/nagios2.6/libexec chown nagios.nagios /www/nagios2.6/libexec/check_nrpe
Create a command definition in your Nagios config file for the NRPE client. See the README file for more info on doing this.
NOTE: remote host(s) must be running the NRPE daemon !!! - Copy the nrpe daemon to /usr/sbin, /apps/nagios2.6 or wherever you feel it fits best. - Copy the sample nrpe.cfg config file to /etc, /apps/nagios2.6 or wherever you feel it fits best. - Modify the /etc/services file and configure NRPE to run under inetd, xinetd, or as a standalone daemon. See the README file for more info on doing this.
Fix apache configuration file:
add contents of /usr/local/src/nagios-2.6/sample-config/httpd.conf to /www/apache2.2.3/conf/httpd.conf
Copy 'etc' directory from old Nagios (if any) to /www/nagios2.6. Go through files cgi.cfg, nagios.cfg and private/* and fix pathes making them point to /www/nagios2.6.
Add several directories for output files:
mkdir /www/nagios2.6/var/log mkdir /www/nagios2.6/var/run mkdir /www/nagios2.6/var/rw (?????)
Install icons:
cd /usr/local/src/nagios-images-0.3/base cp * /www/nagios2.6/share/images/logos
To check configuration run following commands:
/www/nagios2.6/bin/nagios -v /www/nagios2.6/etc/nagios.cfg
To start/stop
/etc/init.d/nagios start/stop/restart
Add Nagios to services:
chkconfig --add nagios chkconfig --level 3 nagios off chkconfig --level 4 nagios off chkconfig --list nagios