Nagios is a host and service monitor designed to inform you of network problems before your clients, end-users or managers do. It has been designed to run under the Linux operating system, but works fine under most *NIX variants as well. The monitoring daemon runs intermittent checks on hosts and services you specify using external "plugins" which return status information to Nagios. When problems are encountered, the daemon can send notifications out to administrative contacts in a variety of different ways (email, instant message, SMS, etc.). Current status information, historical logs, and reports can all be accessed via a web browser.
Nagios has a lot of features, making it a very powerful . Some of the major features are listed below:
Monitoring of (SMTP, POP3, HTTP, NNTP, PING, etc.)
Monitoring of host resources (processor load, disk and memory usage, running processes, , etc.)
Monitoring of environmental factors such as temperature
Simple plugin design that allows users to easily develop their own host and service checks
yum install httpd
yum install gcc
Create a new nagios user account and give it a password.
/usr/sbin/usermod -G nagcmd nagios
/usr/sbin/usermod -G nagcmd apache
Create a directory for storing the downloads.
tar xzf nagios-3.0.tar.gz
Run the Nagios configure script, passing the name of the group you created earlier like so:
Compile the Nagios source code.
Install binaries, init script, sample config files and set permissions on the external command directory.
Don't start Nagios yet - there's still more that needs to be done...
Sample configuration files have now been installed in the /usr/local/nagios/etc directory. These sample files should work fine for getting started with Nagios. You'll need to make just one change before you proceed...
Edit the /usr/local/nagios/etc/objects/contacts.cfg config file with your favorite editor and change the email address associated with the nagiosadmin contact definition to the address you'd like to use for receiving alerts.
Install the Nagios web config file in the Apache conf.d directory.
Create a nagiosadmin account for logging into the Nagios web interface. Remember the password you assign to this account - you'll need it later.
htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
Restart Apache to make the new settings take effect.
service httpd restart
tar xzf nagios-plugins-1.4.11.tar.gz
Compile and install the plugins.
./configure --with-nagios-user=nagios --with-nagios-group=nagios
chkconfig --add nagios
chkconfig nagios on
Verify the sample Nagios configuration files.
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
If there are no errors, start Nagios.
service nagios start