Centos 6 – Install Nagios client from source

Published on Author gryzli

We are assuming that our Nagios Server has IP:

By default client NRPE will listen on port 5666, so make sure it’s enabled on IPTABLES.


Add nagios user

useradd nagios


Install openssl devel

yum install openssl-devel


Install xinetd

yum install xinetd



Install Nagios NRPE

Current version of NRPE is 2.15.

cd /usr/src

wget 'http://sourceforge.net/projects/nagios/files/nrpe-2.x/nrpe-2.15/nrpe-2.15.tar.gz/download' -O nrpe-2.15.tar.gz

tar xvzf nrpe-2.15.tar.gz && cd nrpe-2.15

make all
make install-plugin
make install-daemon
make install-daemon-config
make install-xinetd


Install Nagios Plugins

cd /usr/src

wget 'http://nagios-plugins.org/download/nagios-plugins-2.0.3.tar.gz'

tar xvzf nagios-plugins-2.0.3.tar.gz && cd nagios-plugins-2.0.3

./configure --prefix=/usr/local/nagios
make install


Allow Nagios Server connections

1. OpenĀ /usr/local/nagios/etc/nrpe.cfg and change:

# The IP of our Nagios Server

2. OpenĀ /etc/xinet.d/nrpe

   only_from       =

3. Open /etc/services and ensure there is the following line

# ....
nrpe 5666/tcp
# ....


Restart xinetd and enable by default

/etc/init.d/xinetd restart

chkconfig xinetd on


Finally try to issue nrpe command from the Nagios server

Logon to your Nagios Server and issue the following:

# We assume that "" is the IP of the Nagios client
/usr/local/nagios/libexec/check_nrpe -H -c check_load

Results in something like that:

OK – load average: 0.01, 0.03, 0.00|load1=0.010;15.000;30.000;0; load5=0.030;10.000;25.000;0; load15=0.000;5.000;20.000;0;