Friday, June 11, 2010

Installing Nagios-plugins and NRPE on Centos 5.x

To monitor remote hosts CPU load, disk partitions, processes etc with Nagios, requires to install NRPE and nagios-plugins on the remote host.

This is how I do it...

Nagios-plugins and NRPE is not available from Centos official repositories, so first of all we need to configure RPMforge> repo from where to install the required packages.

Read my previous article before configuring and installing anything from third party repo.

Installing RPMforge on Centos 5.x

Download the rpmforge-release package. Choose one of the two links below, selecting to match your host's architecture. If you are unsure of which one to use you can check your architecture with the command uname -i

x386
wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el5.rf.i386.rpm

x86_64
wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el5.rf.x86_64.rpm

Install the RPMForget key

rpm --import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt

If key didn't install no worries yum will ask when installing a package from rpmforge repo.

Verify the package you have downloaded
# rpm -K rpmforge-release-0.5.1-1.el5.rf.*.rpm

Install the package
# rpm -ivh rpmforge-release-0.5.1-1.el5.rf.*.rpm

Now everything is setup now you can install nagios-plugins and nrpe packages from RPMforge repo

# yum install nagios-plugins nagios-nrpe

Running NRPE under xinetd

Edit /etc/xinetd.d/nrpe for

disable         = no
only_from       = 127.0.0.1 NagiosServerIP

Restart xinetd service

# /etc/init.d/xinetd restart

1 comment:

  1. you need to enter something like
    nagios-nrpe 5666/tcp # nagios-nrpe

    in /etc/services in order to use it with xinetd

    ReplyDelete