January 13, 2014

Install Nagios Core 3.5 on RHEL 6 from EPEL Repository

Introduction

The Nagios is one of the most poplur product for monitoring IT Infrastructure, such as servers, network and services.

The system overview of the Nagios modules:

  • Nagios Core - The Server with Monitor GUI.
  • NRPE (Nagios Remote Plugin Executor) - The communication handler between server and client/agent.
  • Nagios Plugins - Client or Agent that do the actual monitoring, e.g. check server load or if service is running.

Remember Nagios is not supported by Red Hat and installing Nagios from EPEL repository, is on you own risk. But if you think of the alternative, which is installing Nagios from source and compiling it with gcc is not an attractive alternative. Since then you have to manually uphold the patch level you want in production. And beside you do not want to have the gcc compiler installed in production, due to security risks.

For manual installation see http://nagios.sourceforge.net/docs/3_0/quickstart-fedora.html.

Installation

Install the EPEL (Extra Packages for Enterprise Linux) repository. [https://fedoraproject.org/wiki/EPEL]

$ rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

Install the Nagios Core and all plugins.

$ yum install nagios nagios-plugins-all

Start Nagios Server.

$ service nagios start

Start Nagios Server Web GUI.

$ service httpd start

Nagios Core Web GUI

http://localhost/nagios

username: nagiosadmin
password: nagiosadmin

To change the default password for admin, see /etc/httpd/conf.d/nagios.conf.

$ htpasswd /etc/nagios/passwd nagiosadmin

Reference for htpasswd - Manage user files for basic authentication. [http://httpd.apache.org/docs/2.2/programs/htpasswd.html]

Configuration Files

The Nagios main configuration file.

$ /etc/nagios/nagios.cfg

The Nagios Core Admin Server is built with CGI scripts.

$ /etc/nagios/cgi.cfg

HTTPD configuration for Nagios Core

$ /etc/httpd/conf.d/nagios.conf

Appendix. RPM Dependency and Installation

$ repoquery -q --requires --plugins nagios
/bin/sh
chkconfig
group(nagios)
httpd
initscripts
libc.so.6(GLIBC_2.8)(64bit)
libcrypt.so.1()(64bit)
libdl.so.2()(64bit)
libdl.so.2(GLIBC_2.2.5)(64bit)
libgcc_s.so.1()(64bit)
libgcc_s.so.1(GCC_3.0)(64bit)
libgcc_s.so.1(GCC_3.3.1)(64bit)
libgd.so.2()(64bit)
libjpeg.so.62()(64bit)
libm.so.6()(64bit)
libm.so.6(GLIBC_2.2.5)(64bit)
libnsl.so.1()(64bit)
libperl.so()(64bit)
libpng12.so.0()(64bit)
libpthread.so.0()(64bit)
libpthread.so.0(GLIBC_2.2.5)(64bit)
libresolv.so.2()(64bit)
libutil.so.1()(64bit)
libz.so.1()(64bit)
mailx
nagios-common
perl(:MODULE_COMPAT_5.10.1)
php
rtld(GNU_HASH)
user(nagios)
$ yum install nagios
...
==============================================================================================================================================================
 Package                              Arch                          Version                                 Repository                                   Size
==============================================================================================================================================================
Installing:
 nagios                               x86_64                        3.5.1-1.el6                             epel                                        1.2 M
Installing for dependencies:
 gd                                   x86_64                        2.0.35-11.el6                           rhel-x86_64-server-6                        142 k
 libXpm                               x86_64                        3.5.10-2.el6                            rhel-x86_64-server-6                         51 k
 nagios-common                        x86_64                        3.5.1-1.el6                             epel                                         17 k
 php                                  x86_64                        5.3.3-27.el6_5                          rhel-x86_64-server-6                        1.1 M
 php-cli                              x86_64                        5.3.3-27.el6_5                          rhel-x86_64-server-6                        2.2 M
 php-common                           x86_64                        5.3.3-27.el6_5                          rhel-x86_64-server-6                        525 k

Transaction Summary
==============================================================================================================================================================
Install       7 Package(s)
$ yum install nagios-plugins-all
...
==============================================================================================================================================================
 Package                                    Arch                     Version                                     Repository                              Size
==============================================================================================================================================================
Installing:
 nagios-plugins-all                         x86_64                   1.4.16-10.el6                               epel                                    14 k
Installing for dependencies:
 fping                                      x86_64                   2.4b2-10.el6                                epel                                    31 k
 lm_sensors                                 x86_64                   3.1.1-17.el6                                rhel-x86_64-server-6                   123 k
 nagios-plugins                             x86_64                   1.4.16-10.el6                               epel                                   200 k
 nagios-plugins-breeze                      x86_64                   1.4.16-10.el6                               epel                                    14 k
 nagios-plugins-by_ssh                      x86_64                   1.4.16-10.el6                               epel                                    35 k
 nagios-plugins-cluster                     x86_64                   1.4.16-10.el6                               epel                                    29 k
 nagios-plugins-dhcp                        x86_64                   1.4.16-10.el6                               epel                                    35 k
 nagios-plugins-dig                         x86_64                   1.4.16-10.el6                               epel                                    34 k
 nagios-plugins-disk                        x86_64                   1.4.16-10.el6                               epel                                    69 k
 nagios-plugins-disk_smb                    x86_64                   1.4.16-10.el6                               epel                                    17 k
 nagios-plugins-dns                         x86_64                   1.4.16-10.el6                               epel                                    35 k
 nagios-plugins-dummy                       x86_64                   1.4.16-10.el6                               epel                                    26 k
 nagios-plugins-file_age                    x86_64                   1.4.16-10.el6                               epel                                    15 k
 nagios-plugins-flexlm                      x86_64                   1.4.16-10.el6                               epel                                    16 k
 nagios-plugins-fping                       x86_64                   1.4.16-10.el6                               epel                                    35 k
 nagios-plugins-game                        x86_64                   1.4.16-10.el6                               epel                                    31 k
 nagios-plugins-hpjd                        x86_64                   1.4.16-10.el6                               epel                                    33 k
 nagios-plugins-http                        x86_64                   1.4.16-10.el6                               epel                                    76 k
 nagios-plugins-icmp                        x86_64                   1.4.16-10.el6                               epel                                    38 k
 nagios-plugins-ide_smart                   x86_64                   1.4.16-10.el6                               epel                                    31 k
 nagios-plugins-ircd                        x86_64                   1.4.16-10.el6                               epel                                    16 k
 nagios-plugins-ldap                        x86_64                   1.4.16-10.el6                               epel                                    33 k
 nagios-plugins-load                        x86_64                   1.4.16-10.el6                               epel                                    31 k
 nagios-plugins-log                         x86_64                   1.4.16-10.el6                               epel                                    15 k
 nagios-plugins-mailq                       x86_64                   1.4.16-10.el6                               epel                                    18 k
 nagios-plugins-mrtg                        x86_64                   1.4.16-10.el6                               epel                                    31 k
 nagios-plugins-mrtgtraf                    x86_64                   1.4.16-10.el6                               epel                                    31 k
 nagios-plugins-mysql                       x86_64                   1.4.16-10.el6                               epel                                    41 k
 nagios-plugins-nagios                      x86_64                   1.4.16-10.el6                               epel                                    31 k
 nagios-plugins-nt                          x86_64                   1.4.16-10.el6                               epel                                    36 k
 nagios-plugins-ntp                         x86_64                   1.4.16-10.el6                               epel                                    48 k
 nagios-plugins-ntp-perl                    x86_64                   1.4.16-10.el6                               epel                                    18 k
 nagios-plugins-nwstat                      x86_64                   1.4.16-10.el6                               epel                                    39 k
 nagios-plugins-oracle                      x86_64                   1.4.16-10.el6                               epel                                    16 k
 nagios-plugins-overcr                      x86_64                   1.4.16-10.el6                               epel                                    33 k
 nagios-plugins-perl                        x86_64                   1.4.16-10.el6                               epel                                    14 k
 nagios-plugins-pgsql                       x86_64                   1.4.16-10.el6                               epel                                    33 k
 nagios-plugins-ping                        x86_64                   1.4.16-10.el6                               epel                                    36 k
 nagios-plugins-procs                       x86_64                   1.4.16-10.el6                               epel                                    67 k
 nagios-plugins-real                        x86_64                   1.4.16-10.el6                               epel                                    32 k
 nagios-plugins-rpc                         x86_64                   1.4.16-10.el6                               epel                                    16 k
 nagios-plugins-sensors                     x86_64                   1.4.16-10.el6                               epel                                    14 k
 nagios-plugins-smtp                        x86_64                   1.4.16-10.el6                               epel                                    70 k
 nagios-plugins-snmp                        x86_64                   1.4.16-10.el6                               epel                                    70 k
 nagios-plugins-ssh                         x86_64                   1.4.16-10.el6                               epel                                    32 k
 nagios-plugins-swap                        x86_64                   1.4.16-10.el6                               epel                                    32 k
 nagios-plugins-tcp                         x86_64                   1.4.16-10.el6                               epel                                    38 k
 nagios-plugins-time                        x86_64                   1.4.16-10.el6                               epel                                    32 k
 nagios-plugins-ups                         x86_64                   1.4.16-10.el6                               epel                                    35 k
 nagios-plugins-users                       x86_64                   1.4.16-10.el6                               epel                                    29 k
 nagios-plugins-wave                        x86_64                   1.4.16-10.el6                               epel                                    14 k
 net-snmp-utils                             x86_64                   1:5.5-49.el6                                rhel-x86_64-server-6                   173 k
 postgresql-libs                            x86_64                   8.4.18-1.el6_4                              rhel-x86_64-server-6                   201 k
 qstat                                      x86_64                   2.11-9.20080912svn311.el6                   epel                                   162 k

Transaction Summary
==============================================================================================================================================================
Install      55 Package(s)
...

No comments: