Nagios on Redhat

This entry was posted in Unix and tagged on June 17, 2012, by

What is nagios ?

    Nagios is a host and and service monitor tool. The features of nagios are as follow,

  • Monitor various equipment such as servers, routers,switches,power supply etc.
  • Monitor services such as disk space, cpu usage, memory usage,HTTP, SSH, mail,etc
  • Nagios can monitor anything such as host,database,services,applications,etc

 

Following are the steps for installing Nagios.

1. Download the nagios and plugins from www.nagios.org

nagios-3.2.1.tar.gz

nagios-plugins-1.4.11.tar.gz

2. Next step is to make sure apache is working or not

http://localhost

3.Verify whether gcc is install

# rpm -qa | grep gcc

If not install gcc .

4. Create user and group for nagios

# useradd nagios

# passwd nagios

# groupadd nagcmd

# usermod -G nagcmd nagios

# usermod -G nagcmd apache

5. Now install the  nagios package.

# gunzip nagios-3.2.1.tar.gz

# tar -xvf nagios-3.2.1.tar

# cd nagios-3.2.1

# ./configure –with-command-group=nagcmd

# make all

# make install

# make install-init

# make install-config

# make install-commandmode

6.Configure the web interface

# make install-webconf

# htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin

New password:

Re-type new password:

7. Now compile and install nagios plugins

# gunzip nagios-plugins-1.4.11.tar.gz

# tar -xvf nagios-plugins-1.4.11.tar

# cd nagios-plugins-1.4.11

# ./configure –with-nagios-user=nagios –with-nagios-group=nagios

# make

# make install

8. Start nagios.

#chkconfig –add nagios

#chkconfig nagios on

*Verify to make sure there no errors in nagios configuration file

# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

Total Warning:0

Total Errors:0

This look okay -No serious problems were detected during the pre-flight check

* Start the nagios

# service nagios start

9. Log in to the web interface

http://localhost/nagios/

Login with the user and password which you created in step #6 above.

Leave a Reply

Your email address will not be published. Required fields are marked *

Copyright 2017 ©Aceadmins. All rights reserved.