How to Install Nagios Monitoring Server on CentOS 6.5

Nagios is one of the alternate open source computer, network and infrastructure monitoring system that will help organizations to identify and resolve IT infrastructure problems before they affect critical business processes. Nagios provides host, service and network monitoring capabilities and was designed with scalability and flexibility. With complete monitoring and alerting, nagios allows you to detect and repair problems and mitigate future issues before they affect end-users and customers. This post will show you how you can install Nagios monitoring server on CentOS 6.5

1. Prepare and download EPEL repository :

[root@centos6-05 ~]# wget dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

2. Install EPEL repository :

[root@centos6-05 ~]# rpm -Uvh epel-release-6-8.noarch.rpm
warning: epel-release-6-8.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
Preparing...                ########################################### [100%]
1:epel-release           ########################################### [100%]

3. Install Nagis packages, php and httpd web server :

[root@centos6-05 ~]# yum install nagios nagios-plugins-all nagios-plugins-nrpe nrpe php httpd -y

Example:

[root@centos6-05 ~]# yum install nagios nagios-plugins-all nagios-plugins-nrpe nrpe php httpd -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * Webmin: download.webmin.com
 * base: mirror.upsi.edu.my
 * epel: mirror.smartmedia.net.id
 * extras: mirror.upsi.edu.my
 * updates: mirror.upsi.edu.my
Setting up Install Process
Package php-5.3.3-27.el6_5.x86_64 already installed and latest version
Package httpd-2.2.15-29.el6.centos.x86_64 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package nagios.x86_64 0:3.5.1-1.el6 will be installed
--> Processing Dependency: user(nagios) for package: nagios-3.5.1-1.el6.x86_64
--> Processing Dependency: user(nagios) for package: nagios-3.5.1-1.el6.x86_64
--> Processing Dependency: nagios-common for package: nagios-3.5.1-1.el6.x86_64
--> Processing Dependency: mailx for package: nagios-3.5.1-1.el6.x86_64
--> Processing Dependency: group(nagios) for package: nagios-3.5.1-1.el6.x86_64
--> Processing Dependency: group(nagios) for package: nagios-3.5.1-1.el6.x86_64
--> Processing Dependency: libgd.so.2()(64bit) for package: nagios-3.5.1-1.el6.x86_64
---> Package nagios-plugins-all.x86_64 0:1.4.16-10.el6 will be installed
--> Processing Dependency: nagios-plugins-wave for package: nagios-plugins-all-1.4.16-10.el6.x86_64
--> Processing Dependency: nagios-plugins-users for package: nagios-plugins-all-1.4.16-10.el6.x86_64
--> Processing Dependency: nagios-plugins-ups for package: nagios-plugins-all-1.4.16-10.el6.x86_64
--> Processing Dependency: nagios-plugins-time for package: nagios-plugins-all-1.4.16-10.el6.x86_64
--> Processing Dependency: nagios-plugins-tcp for package: nagios-plugins-all-1.4.16-10.el6.x86_64
--> Processing Dependency: nagios-plugins-swap for package: nagios-plugins-all-1.4.16-10.el6.x86_64
--> Processing Dependency: nagios-plugins-ssh for package: nagios-plugins-all-1.4.16-10.el6.x86_64
--> Processing Dependency: nagios-plugins-snmp for package: nagios-plugins-all-1.4.16-10.el6.x86_64
--> Processing Dependency: nagios-plugins-smtp for package: nagios-plugins-all-1.4.16-10.el6.x86_64
--> Processing Dependency: nagios-plugins-sensors for package: nagios-plugins-all-1.4.16-10.el6.x86_64
--> Processing Dependency: nagios-plugins-rpc for package: nagios-plugins-all-1.4.16-10.el6.x86_64
--> Processing Dependency: nagios-plugins-real for package: nagios-plugins-all-1.4.16-10.el6.x86_64
--> Processing Dependency: nagios-plugins-procs for package: nagios-plugins-all-1.4.16-10.el6.x86_64
--> Processing Dependency: nagios-plugins-ping for package: nagios-plugins-all-1.4.16-10.el6.x86_64
--> Processing Dependency: nagios-plugins-pgsql for package: nagios-plugins-all-1.4.16-10.el6.x86_64
--> Processing Dependency: nagios-plugins-overcr for package: nagios-plugins-all-1.4.16-10.el6.x86_64
--> Processing Dependency: nagios-plugins-oracle for package: nagios-plugins-all-1.4.16-10.el6.x86_64
--> Processing Dependency: nagios-plugins-nwstat for package: nagios-plugins-all-1.4.16-10.el6.x86_64
--> Processing Dependency: nagios-plugins-ntp-perl for package: nagios-plugins-all-1.4.16-10.el6.x86_64
--> Processing Dependency: nagios-plugins-ntp for package: nagios-plugins-all-1.4.16-10.el6.x86_64
--> Processing Dependency: nagios-plugins-nt for package: nagios-plugins-all-1.4.16-10.el6.x86_64
--> Processing Dependency: nagios-plugins-nagios for package: nagios-plugins-all-1.4.16-10.el6.x86_64
--> Processing Dependency: nagios-plugins-mysql for package: nagios-plugins-all-1.4.16-10.el6.x86_64
--> Processing Dependency: nagios-plugins-mrtgtraf for package: nagios-plugins-all-1.4.16-10.el6.x86_64
--> Processing Dependency: nagios-plugins-mrtg for package: nagios-plugins-all-1.4.16-10.el6.x86_64
--> Processing Dependency: nagios-plugins-mailq for package: nagios-plugins-all-1.4.16-10.el6.x86_64
--> Processing Dependency: nagios-plugins-log for package: nagios-plugins-all-1.4.16-10.el6.x86_64
--> Processing Dependency: nagios-plugins-load for package: nagios-plugins-all-1.4.16-10.el6.x86_64
--> Processing Dependency: nagios-plugins-ldap for package: nagios-plugins-all-1.4.16-10.el6.x86_64
--> Processing Dependency: nagios-plugins-ircd for package: nagios-plugins-all-1.4.16-10.el6.x86_64
--> Processing Dependency: nagios-plugins-ide_smart for package: nagios-plugins-all-1.4.16-10.el6.x86_64
--> Processing Dependency: nagios-plugins-icmp for package: nagios-plugins-all-1.4.16-10.el6.x86_64
--> Processing Dependency: nagios-plugins-http for package: nagios-plugins-all-1.4.16-10.el6.x86_64
--> Processing Dependency: nagios-plugins-hpjd for package: nagios-plugins-all-1.4.16-10.el6.x86_64
--> Processing Dependency: nagios-plugins-game for package: nagios-plugins-all-1.4.16-10.el6.x86_64
--> Processing Dependency: nagios-plugins-fping for package: nagios-plugins-all-1.4.16-10.el6.x86_64
--> Processing Dependency: nagios-plugins-flexlm for package: nagios-plugins-all-1.4.16-10.el6.x86_64
--> Processing Dependency: nagios-plugins-file_age for package: nagios-plugins-all-1.4.16-10.el6.x86_64
--> Processing Dependency: nagios-plugins-dummy for package: nagios-plugins-all-1.4.16-10.el6.x86_64
..
..
..

Installed:
  nagios.x86_64 0:3.5.1-1.el6                     nagios-plugins-all.x86_64 0:1.4.16-10.el6
  nagios-plugins-nrpe.x86_64 0:2.14-5.el6         nrpe.x86_64 0:2.14-5.el6

Dependency Installed:
  dmidecode.x86_64 1:2.11-2.el6                    fontconfig.x86_64 0:2.8.0-3.el6
  fping.x86_64 0:2.4b2-10.el6                      gd.x86_64 0:2.0.35-11.el6
  libgssglue.x86_64 0:0.1-11.el6                   libtalloc.x86_64 0:2.0.7-2.el6
  libtdb.x86_64 0:1.2.10-1.el6                     libtevent.x86_64 0:0.9.18-3.el6
  libtirpc.x86_64 0:0.2.1-6.el6_4                  lm_sensors.x86_64 0:3.1.1-17.el6
  mailx.x86_64 0:12.4-7.el6                        nagios-common.x86_64 0:3.5.1-1.el6
  nagios-plugins.x86_64 0:1.4.16-10.el6            nagios-plugins-breeze.x86_64 0:1.4.16-10.el6
  nagios-plugins-by_ssh.x86_64 0:1.4.16-10.el6     nagios-plugins-cluster.x86_64 0:1.4.16-10.el6
  nagios-plugins-dhcp.x86_64 0:1.4.16-10.el6       nagios-plugins-dig.x86_64 0:1.4.16-10.el6
  nagios-plugins-disk.x86_64 0:1.4.16-10.el6       nagios-plugins-disk_smb.x86_64 0:1.4.16-10.el6
  nagios-plugins-dns.x86_64 0:1.4.16-10.el6        nagios-plugins-dummy.x86_64 0:1.4.16-10.el6
  nagios-plugins-file_age.x86_64 0:1.4.16-10.el6   nagios-plugins-flexlm.x86_64 0:1.4.16-10.el6
  nagios-plugins-fping.x86_64 0:1.4.16-10.el6      nagios-plugins-game.x86_64 0:1.4.16-10.el6
  nagios-plugins-hpjd.x86_64 0:1.4.16-10.el6       nagios-plugins-http.x86_64 0:1.4.16-10.el6
  nagios-plugins-icmp.x86_64 0:1.4.16-10.el6       nagios-plugins-ide_smart.x86_64 0:1.4.16-10.el6
  nagios-plugins-ircd.x86_64 0:1.4.16-10.el6       nagios-plugins-ldap.x86_64 0:1.4.16-10.el6
  nagios-plugins-load.x86_64 0:1.4.16-10.el6       nagios-plugins-log.x86_64 0:1.4.16-10.el6
  nagios-plugins-mailq.x86_64 0:1.4.16-10.el6      nagios-plugins-mrtg.x86_64 0:1.4.16-10.el6
  nagios-plugins-mrtgtraf.x86_64 0:1.4.16-10.el6   nagios-plugins-mysql.x86_64 0:1.4.16-10.el6
  nagios-plugins-nagios.x86_64 0:1.4.16-10.el6     nagios-plugins-nt.x86_64 0:1.4.16-10.el6
  nagios-plugins-ntp.x86_64 0:1.4.16-10.el6        nagios-plugins-ntp-perl.x86_64 0:1.4.16-10.el6
  nagios-plugins-nwstat.x86_64 0:1.4.16-10.el6     nagios-plugins-oracle.x86_64 0:1.4.16-10.el6
  nagios-plugins-overcr.x86_64 0:1.4.16-10.el6     nagios-plugins-perl.x86_64 0:1.4.16-10.el6
  nagios-plugins-pgsql.x86_64 0:1.4.16-10.el6      nagios-plugins-ping.x86_64 0:1.4.16-10.el6
  nagios-plugins-procs.x86_64 0:1.4.16-10.el6      nagios-plugins-real.x86_64 0:1.4.16-10.el6
  nagios-plugins-rpc.x86_64 0:1.4.16-10.el6        nagios-plugins-sensors.x86_64 0:1.4.16-10.el6
  nagios-plugins-smtp.x86_64 0:1.4.16-10.el6       nagios-plugins-snmp.x86_64 0:1.4.16-10.el6
  nagios-plugins-ssh.x86_64 0:1.4.16-10.el6        nagios-plugins-swap.x86_64 0:1.4.16-10.el6
  nagios-plugins-tcp.x86_64 0:1.4.16-10.el6        nagios-plugins-time.x86_64 0:1.4.16-10.el6
  nagios-plugins-ups.x86_64 0:1.4.16-10.el6        nagios-plugins-users.x86_64 0:1.4.16-10.el6
  nagios-plugins-wave.x86_64 0:1.4.16-10.el6       net-snmp-utils.x86_64 1:5.5-49.el6
  ntp.x86_64 0:4.2.6p5-1.el6.centos                ntpdate.x86_64 0:4.2.6p5-1.el6.centos
  openssh-clients.x86_64 0:5.3p1-94.el6            qstat.x86_64 0:2.11-9.20080912svn311.el6
  rpcbind.x86_64 0:0.2.0-11.el6                    samba-client.x86_64 0:3.6.9-167.el6_5
  samba-common.x86_64 0:3.6.9-167.el6_5            samba-winbind.x86_64 0:3.6.9-167.el6_5
  samba-winbind-clients.x86_64 0:3.6.9-167.el6_5

Complete!

4. Make httpd and nagios software auto start at boot :

[root@centos6-05 ~]# chkconfig httpd on
[root@centos6-05 ~]# chkconfig nagios on

5. Start httpd and nagios software :

[root@centos6-05 ~]# service httpd start
Starting httpd:                                            [  OK  ]
[root@centos6-05 ~]# service nagios start
Starting nagios: done.

6. Set Nagios Admin Panel Password:

[root@centos6-05 ~]# htpasswd -c /etc/nagios/passwd nagiosadmin
New password:
Re-type new password:
Adding password for user nagiosadmin

7. Navigate over to your IP address http://IPADDRESS/nagios and login using above “nagiosadmin” > However, you still able to change /etc/nagios/cgi.cfg and redefine authorized admin anytime later.

[root@centos6-05 ~]# vi /etc/nagios/cgi.cfg
..
..
authorized_for_system_information=nagiosadmin
..
..

How to Reset the Directory Manager Password on RHEL 7 / CentOS 7
How to Reset the Directory Manager Password on RHEL 7 / CentOS 7

It is best practice to remember passwords, but because too many passwords, sometimes we forget. We are not encouraged to write the password on any paper or share the password...

How to Find Big Files Size on Linux RHEL/CentOS
How to Find Big Files Size on Linux RHEL/CentOS

As the linux administrator, sometimes we have to identify which files are most take much space in the linux server resulting in low free space. Low disk space can also...

Why Linux users should worry about malware and what they can do about it
Why Linux users should worry about malware and what they can do about it

Don’t drop your guard just because you’re running Linux. Preventing the spread of malware and/or dealing with the consequences of infection are a fact of life when using computers. If...

How to Reset Forgotten Root Password on Linux RHEL 7 / CentOS 7
How to Reset Forgotten Root Password on Linux RHEL 7 / CentOS 7

This short howto will explain the steps to reset a lost root password or to reset a forgotten root password on Linux RHEL 7 or CentOS 7. Basically, we will...

How to Update CentOS or Upgrade CentOS to the Latest Version
How to Update CentOS or Upgrade CentOS to the Latest Version

Recently, the latest version of CentOS 7.3 was released. All users of CentOS 7.0, 7.1 and 7.2 can upgrade their system to the most recent. This quick guide will explain...

How to Change your WordPress Username, Nickname and Display Name in MySQL
How to Change your WordPress Username, Nickname and Display Name in MySQL

After you create an account log in WordPress, you may want to change your WordPress username, as appropriate or due to security reason. However, you can not do this from...

How to Enable SSH Root Login on Ubuntu 16.04
How to Enable SSH Root Login on Ubuntu 16.04

As what we wrote in the previous article on how to allow SSH root on Ubuntu 14.04, after installing a fresh new copy of Ubuntu 16.04 LTS, we find that...

How to Change UUID of Linux Partition on CentOS 7
How to Change UUID of Linux Partition on CentOS 7

UUID (Universally Unique IDentifier) should be unique and it is used to identify storage devices on a linux system. If you cloned a virtual machine from vCenter, the metadata containing...

2 Comments

  • Avatar for Gilbert Gilbert says:

    On my freshly installed centos 6.5 server, when I run :

    yum install nagios nagios-plugins-all nagios-plugins-nrpe nrpe php httpd -y

    I get :

    ….

    –> Finished Dependency Resolution

    Error: Package: nagios-plugins-mysql-1.4.15-2.el5.x86_64 (epel)

    Requires: libmysqlclient.so.15()(64bit)

    Error: Package: nagios-2.12-10.el5.x86_64 (epel)

    Requires: perl(:MODULE_COMPAT_5.8.8)

    Error: Package: nagios-plugins-pgsql-1.4.15-2.el5.x86_64 (epel)

    Requires: libpq.so.4()(64bit)

    Error: Package: nagios-plugins-mysql-1.4.15-2.el5.x86_64 (epel)

    Requires: libmysqlclient.so.15(libmysqlclient_15)(64bit)

    You could try using –skip-broken to work around the problem

    You could try running: rpm -Va –nofiles –nodigest

    Any idea on how to solve the missing dependencies ?

    Thanks!

    • Avatar for SHAIK CHANDBASHA SHAIK CHANDBASHA says:

      # yum update
      First go to nagios website and download the package then after extract that package and install that one …………………

      # cd nagios

      # ./fullinstall

Leave a Reply

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