add nagios for nagios system:
# useradd nagios –s /sbin/nologin
install nagios:
# tar zvxf nagios-3.5.0.tar.gz
# cd nagios
# ./configure --prefix=/usr/local/nagios \
# --with-nagios-user=nagios \
# --with-nagiso-group=nagios \
# --sysconfdir=/etc/nagios
# make all
# make install
# make install-init
# make install-commandmode
# make install-config
# make install-webconf
# htpasswd -c /etc/nagios/htpasswd.users nagios
# vi /etc/nagios/cgi.cfg
# chown nagios:nagios /etc/nagios/htpasswd.users
install nagios-plugins:
# tar xzf nagios-plugins-1.4.16.tar.gz
# cd nagios-plugins-1.4.16
# --with-nagios-group=nagios \
# make
configuration file syntax checking:
# /usr/local/nagios/bin/nagios -v /etc/nagios/nagios.cfg
start http & nagios:
# service httpd start
# service nagios start
testing nagios web site as following:
http://localhost/nagios
install rrdtool:
# tar xzf rrdtool-1.4.7.tar.gz
# cd rrdtool-1.4.7
# ./configure --prefix=/usr/local/rrdtool \
# --sysconfdir=/etc/rrdtool
install pnp4nagios plugins with nagios:
# tar zvxf pnp4nagios-0.6.21.tar.gz
# cd pnp4nagios-0.6.21
# ./configure --prefix=/usr/local/pnp4nagios \
# --with-rrdtool=/usr/local/rrdtool/bin/rrdtool \
# --sysconfdir=/etc/pnp \
# --with-httpd-conf=/etc/httpd/conf.d
modify pnp4nagios configuration file:
# vi /etc/httpd/conf.d/pnp4nagios.conf
integration of the pnp4nagios and nagios:
# vi /etc/nagios/nagios.cfg
# vi /etc/nagios/objects/commands.cfg
pnp4nagios display graphics in the the nagios host or service by adding host-pnp, srv-pnp, as follows:
# vi /etc/nagios/objects/localhost.cfg
restart http & nagios:
# service httpd restart
# service nagios restart
delete /usr/local/pnp4nagios/share/install.php,otherwise it can not be viewed:
# rm /usr/local/pnp4nagios/share/install.php
----------------------------------------------note----------------------------------------------
image files are located in:/usr/local/pnp4nagios/var/perfdata
operating system installation package(rhel5.8-x64-----1):http://down.51cto.com/data/753238
operating system installation package(rhel5.8-x64-----2):http://down.51cto.com/data/753249
operating system installation package(rhel5.8-x64-----3):http://down.51cto.com/data/753271
operating system installation package(rhel5.8-x64-----4):http://down.51cto.com/data/753311
operating system installation package(rhel5.8-x64-----5):http://down.51cto.com/data/753327
operating system installation package(rhel5.8-x64-----6):http://down.51cto.com/data/753337
operating system installation package(rhel5.8-x64-----7):http://down.51cto.com/data/753366
operating system installation package(rhel5.8-x64-----8):http://down.51cto.com/data/753375
the location of the package:http://down.51cto.com/data/750641