Installing Nagios to Monitoring SNMP on Centos

Nagios is an open-source monitoring system.

Nagios is open source software licensed under the GNU GPL V2. It provides:

– Monitoring of network services (SMTP, POP3, HTTP, NNTP, ICMP, SNMP, FTP, SSH)
– Monitoring of host resources (processor load, disk usage, system logs) on a majority of network operating systems, including Microsoft Windows with the NSClient++ plugin or Check MK.
– Monitoring of anything else like probes (temperature, alarms…) which have the ability to send collected data via a network to specifically written plugins
– Monitoring via remotely-run scripts via Nagios Remote Plugin Executor.
– Remote monitoring supported through SSH or SSL encrypted tunnels.
– A simple plugin design that allows users to easily develop their own service checks depending on needs, by using their tools of choice (shell scripts, C++, Perl, Ruby, Python, PHP, C#, etc.)
– Available data graphing plugins.
– Parallelized service checks.
– The ability to define network host hierarchies using “parent” hosts, allowing detection of and distinction between hosts that are down or unreachable.
– The ability to define network host hierarchies using “parent” hosts, allowing detection of and distinction between hosts that are down or unreachable.
– Contact notifications when service or host problems occur and get resolved (via e-mail, pager, SMS, or any user-defined method through plugin system).
– The ability to define event handlers to be run during service or host events for proactive problem resolution.
– Automatic log file rotation.
– Support for implementing redundant monitoring hosts.
– An optional web-interface for viewing current network status, notifications, problem history, log files, etc.
– Data storage via text files rather than database.


1. The first step installing:

     yum install httpd php

     yum install gcc

     yum install glibc glibc-common

     yum install gd gd-devel

2. second step

     create nagios user

     #/usr/sbin/useradd -m nagios

     #passwd nagios

3. Third step you will addgroup nagios on user

      /usr/sbin/groupadd nagcmd

      /usr/sbin/usermod -a -G nagcmd nagios

      /usr/sbin/usermod -a -G nagcmd apache

4. Fourth step download nagios program at
       - Nagios core
       - Nagios frontend
       - Nagios pluign

5. Five step you will install all download from nagios

     Extract nagios rar
     tar  -zxvf  nagios-3.1.0.tar.gz  

     Go to nagios folder
     cd nagios/

     compile nagios file
     ./configure --with-command-group=nagcmd

     make file
     #make all; make install; make install-init; make install-config; make install-commandmode; make install-webconf


6. IF you want change email addres on nagios go to

     nano /usr/local/nagios/etc/objects/contacts.cfg

7. Create user nagios to login on web

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

8. Restart Httpd server

     service httpd restart

9. Installing plugins

      Extract nagios plugin 
      tar  -zxvf   nagios-plugins-1.4.13.tar.gz

      cd plugin ektract
      ./configure --with-nagios-user=nagios --with-nagios-group=nagios

      make; make install

10. activated chkconfig

      chkconfig nagios on

11. Activated service nagios

      service nagios restart

12. To change nagios config

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

13. Start nagios

     service nagios restart

running nagios with your ip


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s