Nagios: Difference between revisions
No edit summary |
No edit summary |
||
Line 49: | Line 49: | ||
Install plugins and nrpe - see corresponding sections | Install plugins and nrpe - see corresponding sections. | ||
Revision as of 19:15, 6 January 2007
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
Install plugins and nrpe - see corresponding sections.
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 (restart need to be fixed ..):
/etc/init.d/nagios start/stop
Add Nagios to services:
chkconfig --add nagios chkconfig --level 3 nagios off chkconfig --level 4 nagios off chkconfig --list nagios
NOTE: following command was executed to let browser to disable host checks; it should be investigated ...
chown nagios:nagcmd /www/nagios2.6/var/log/nagios.cmd