Saturday, November 26, 2011

Nagios on Ubuntu with NConf

Installing Dependencies
# apt-get install apache2 libapache2-mod-php5 php5 php5-mysql mysql-server mysql-client perl libdbi-perl libdbd-mysql-perl gawk


Installing Nagios
# apt-get install nagios3
#/etc/init.d/apache2 restart

http://<yourserver>/nagios3

For monitor Windows servers using NSClient++ (which I am doing), also install the NRPE plugin with:
sudo apt-get install nagios-nrpe-plugin

NConf provides a web-based frontend for configuring Nagios. There’s no package in the Ubuntu repositories for it, but you can download it pretty easily. Version 1.2.6 was the latest as of the time of this writing, so make sure you’re getting the latest version.
wget http://downloads.sourceforge.net/project/nconf/nconf/1.2.6-0/nconf-1.2.6-0.tgz

var/www/nconf/
rm -rf INSTALL INSTALL.php UPDATE UPDATE.php
rm -rf NagiosConfig.tgz*
Generate Nagios config
/var/www/nconf/output# tar zxvf NagiosConfig.tgz
cp -av /var/www/nconf/output/global/* /etc/nagios3/global/
cp -av /var/www/nconf/output/Default_collector/* /etc/nagios3/Default_collector/

/etc/init.d/nagios3 reload

No comments:

Post a Comment