How to monitor network services using Nagios
Today in the morning, one of my friend asked me to help resolving network related problem. Actually, he didn’t know what the problem exactly was. All he know was just he could not access to network mapped drive. Let me describe this problem in detail in next paragraph.
There is an enterprise network with 2 servers: Microsoft Windows 2000 Advanced Server and RedHat Linux 8.0. He usually works on Microsoft Windows XP using shared data and database on Windows 2000. Sometimes he encounters connection problem that he will be unable to access to the Windows 2000 for a while.
I don’t know too. When he called me, I found that everything works fine as expect so I had to wait for next time again and again. That means I have to prove its connectivity problem all time even when I don’t stay awake. My solution is to deploy network monitoring system on this enterprise network to actively monitor the connectivity and availability of all servers and services. At last, I chose Nagios. Nagios seems to be the most advanced and feature-rich network monitoring system written in C. However, its configuration system is very complicated. Below is my procedure to install and configure Nagios.
- Download and extract Nagios and its plugin (I chose to install Nagios 1.3)
- Run configure script to generate Makefile
- Run make all, make install, make install-init, make install-commandmode and make install-config
- Install nagios as a service using chkconfig --add nagios
- Rename all configuration files in /usr/local/nagios/etc and modify them to match your environment
- Verify configuration files using /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
- Configure Apache by adding below configuration
ScriptAlias /nagios/cgi-bin/ /usr/local/nagios/sbin/
Alias /nagios/ /usr/local/nagios/share/
AllowOverride AuthConfig
Options ExecCGI
Order allow,deny
Allow from all
Options None
AllowOverride AuthConfig
Order allow,deny
Allow from all - Create .htaccess in /usr/local/nagios/sbin and /usr/local/nagios/share as follow.
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
require valid-user - Create /usr/local/nagios/etc/htpasswd.user using htpasswd -c /usr/local/nagios/etc/htpasswd.user nagiosadmin
- Now you are ready to restart apache and start nagios
As this configuration, you could access to nagios at http://localhost/nagios/.
Technorati Tags: English, IT, Security, Review, Tips and Tricks, Network Monitoring System, Nagios, Apache, Enterprise Monitoring
- sugree's blog
- 1324 reads
Post new comment