Install nconf web interface for nagios on debian/ubuntu
Last post was about how to install nagios on debian or Ubuntu. Nagios is a famous monitoring script but problem is it is command based, however several third party web interfaces are available, one of which is nconf.
Download nconf
wget http://downloads.sourceforge.net/project/nconf/nconf/1.2.6-0/nconf-1.2.6-0.tgz tar xzvf nconf-1.2.6-0.tgz -C /var/www
Change the web owner for nconf
chown -R www-data:www-data /var/www/nconf
Create a database/username/password to use for nconf, you can use phpmyadmin for this purpose if you have it install.
- Now browse http://your_ip_address/nconf
- Follow steps to install nconf
- Use everything default except NAGIOS_BIN variable to /usr/sbin/nagios3
at the end it will ask you to delete following files and directories
rm -rf INSTALL INSTALL.php UPDATE UPDATE.php
Nagios configuration
Now its time to configure nagios for nconf
- Open /etc/nagios3/nagios.cfg
- comment out all the lines that begin with cfg_dir= or cfg_file=
- Add following 2 lines and save file
cfg_dir=/etc/nagios3/global cfg_dir=/etc/nagios3/Default_collector
Now create directory
mkdir /etc/nagios3/import
Nconf configuration for nagios
Open
nano -w /var/www/nconf/ADD-ONS/deploy_local.sh
and correct the following 2 paths
OUTPUT_DIR="/var/www/nconf/output" NAGIOS_DIR="/etc/nagios3/"
Now run
chmod +x deploy_local.sh ./deploy_local.sh
Also go to http://your_ip_address/nconf and click on “Generate nagios config”
This command will generate an output named “NagiosConfig.tgz” in /var/www/nconf/output
Extract this and it will give you 2 directories named “global” and “Default_collector”
Copy both of them to /etc/nagios3
mv global /etc/nagios3 mv Default_collector /etc/nagios3
And we are almost done
Restart nagios
localhost:~# /etc/init.d/nagios3 restart
Restarting nagios3 monitoring daemon: nagios3
.Add crontab
localhost:~# crontab -e * * * * * /var/www/nconf/ADD-ONS/deploy_local.sh
Related posts:
- How to install nagios on Debian ?
- Installing & configuring shorewall firewall in Ubuntu/Debian
- Installing and configuring PPTP VPN on XEN VPS (debian/CentOS)
















No Comment to “Install nconf web interface for nagios on debian/ubuntu”