Torrid  
Home Sitemap Contac us
     
Home   Knowledge Center   Network Monitoring Using Nagios
Squid With AD Authentication
................................................
Network Monitoring Using Nagios
................................................
IT Service Desk
................................................
 
 
 
Network Monitoring using Nagios 


Nagios is a popular network monitoring application that helps an administrator to detect the faults in network components. It can also send e-notifications on detection of any fault or outage. Nagios includes following features:

1. Service monitoring (like http, ftp, smtp, dns, ping, etc)
2. Resource monitoring on hosts (like CPU, RAM, HDD, etc.)
3. Users can design their own service checks
4. Sending e-notifications during faults or outage
5. Log rotation
6. Support for redundant monitoring hosts implementation
7. Web Monitoring Console

Licensing
Nagios is licensed under the terms of the GNU General Public License Version 2 as published by the Free Software Foundation. This gives you legal permission to copy, distribute and/or modify Nagios under certain conditions. Read the 'LICENSE' file in the Nagios distribution or read the online version of the license for more details.

Installation Environment
This document gives you fair idea on installation of Nagios on Centos 4 operating system. The configuration available in this document is to monitor our own servers, and readers may consider this as a quick help to configure more servers as per their monitoring scope and requirements.
"yum" is one of the favourite utilities for most of the administrators. And we are going to install Nagios using the same. Nagios is not available in the default repository of Centos and thereby firstly we need to install rpmforge-release, available at DAG's rpm repository. Follow below steps to download and install rpmforge-release rpm for Centos 4 and install nagios using "yum".

Installation

After successful installation of Nagios rpms, you will find "nagios.conf" file in "conf.d" directory of apache. By default, SSL and host based access control is commented in the configuration file. But you may uncomment that to enable further security. Next, we are going to configure a user "nagiosadmin" as a admin user that will have the rights to enter into web-console of Nagios.

HTTP Password

Search for following parameters in "/etc/nagios/cgi.cfg" using 'vi' editor and replace them with below mentioned:

File: /etc/nagios/cgi.cfg

Move the file "localhost.cfg" in "/etc/nagios" to "localhost.cfg.org" as we won't be using that and are going to monitor remote servers.

Move Default Config.

Now edit "nagios.cfg" using 'vi' editor to match below lines and leave the rest of the lines intact.

File: /etc/nagios/nagios.cfg

Now create all the files which have been enabled in above configuration file. Also change the file permissions.

Create Config. Files

We need to place the required contents into created files. Let us start from "timeperiods.cfg". Open this file into 'vi' editor and configure the timing periods like business hours, off hours, weekends, etc. Below are the contents for the same.

File: /etc/nagios/timeperiods.cfg

Configure contact information for the administrators and create administrator group (optional) who should receive the alerts during fault or outage.

File:/etc/nagios/contacts.cfg

File:/etc/nagios/contactgroups.cfg

Now configure the hosts and hostgroups (optional) to be monitored in "/etc/nagios/hosts.cgi" and "/etc/nagios/hostgroups.cgi" respectively.

File:/etc/nagios/hosts.cfg

File:/etc/nagios/hostgroups.cfg

Now configure the services you want to monitor and map the hosts with those services. There are few per-defined services in "/etc/nagios/commands.cfg" however you can also configure custom services. Edit "/etc/nagios/services.cfg" to define and map services with the hosts you want to configure.

File:/etc/nagios/services.cfg

In the above configuration, we have used check_ping, check_http and check_smtp commands to monitor servers under Torrid_Servers group. Groups are useful if we need to monitor multiple servers. In this configuration example, we could have used host_name parameter and there should have been no need to configure hostgroups. Now everything is setup and you can make a final testing by using below command to get similar output.

Verify Configuration

Incase of any errors, check the detailed message and fix them accordingly. Once you get "Things look okay" status start the nagios service.

Start Nagios

Now open your internet browser and open nagios web-console to monitor the configured servers. Link to nagios web-console will be http://NAGIOS_SERVER_IP/nagios

For more information:  http://nagios.sourceforge.net/docs/2_0/toc.html


Feedback/Suggestions: feedback@torridnet.com