Nagios is the most widely used open source monitoring tools which help us to monitor the services and application that run’s on Windows,Linux,Routers and other network devices. With the help of Nagios you can monitor basic services and attributes. We can access the Nagios using web interface coming with the bundle and configuration need to be done on the file level ( Editing the conf file using the VI editor).
This Tutorial describes how can you monitor “private” services and attributes of Linux/UNIX servers, such as:
- CPU load
- Memory usage
- Disk usage
- Logged in users
- Running processes
We required to create the user account for accessing the Nagios installation and configuration files. Before starting become the root user.
Create a new user in the name of “nagios” and give it a password.
Set the password.
Create a new group called nagcmd for allowing the external commands to be excuted through the web interface. change nagios and apache user to the created group.
Download Nagios & Plugin:
Download the Nagios and the Nagios plugins using the following command ( For latest version Visit Nagios WebSite )
Extract Nagios archive.
Run the Nagios configure script, with the group mentioned.
Compile the Nagios source code.
Install binaries, init script, sample configuration files and set permissions on the external command directory.
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.
Change the Email address field to receive the notification.
contact_name nagiosadmin ; Short name of userus
generic-contact ; Inherit default values from generic-contact template (defined above)
alias Nagios Admin ; Full name of useremail
firstname.lastname@example.org ; <<***** CHANGE THIS TO YOUR EMAIL ADDRESS ******
Configure Web Interface:
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.
Install the Nagios Plugins:
Extract the Nagios plugins source code tarball.
Compile and install the plugins. While compiling i got an errorfor SSL Verison; here is the Nagios troubleshooting.
./configure --with-nagios-user=nagios --with-nagios-group=nagios
Add it on system start-up using the following command
Verify the sample Nagios configuration files.
If there are no errors, start Nagios.
See if SELinux is in Enforcing mode.
Put SELinux on Permissive mode.
To make this change permanent, you’ll have to modify the settings in /etc/selinux/config and reboot.
Access Web Interface:
Now access the Nagios web interface using the following URL. You’ll be prompted for the username (nagiosadmin) and password you specified earlier.
You will redirect to the home page, Click on the Services to view Status of Hosts.
Install Nagios 3.4.4
Install Nagios on CentOS
Install Nagios on CentOS 6
Install Nagios on Redhat
Install Nagios on RHEL 6
Setup Nagios on CentOS
Configure Nagios on CentOS 6
Configire Nagios on RHEL 6
Install Nagios on Fedora
Step by Step Nagios installation