NRPE is called as ‘Nagios Remote Plugin Executor’. NRPE allows nagios server
to remotely execute nagios commands or plugins on other Linux/Unix machines. NRPE is also available windows servers.
Following document shows you how to install NRPE, I am installing it on CentOS 6.4
1] Install NRPE required packages.
[root@server ~]# yum install openssl-devel gcc xinetd make
2] NRPE runs under the user “nagios”, so let’s add that user.
[root@server ~]# useradd nagios
3] Download and install Nagios-plugins.
[root@server downloads]# wget https://nagios-plugins.org/download/nagios-plugins-2.0.tar.gz
[root@server downloads]# tar -xvzf nagios-plugins-2.0.tar.gz
[root@server downloads]# cd nagios-plugins-2.0
[root@server nagios-plugins-2.0]# ./configure –with-nagios-user=nagios –with-nagios-group=nagios
[root@server nagios-plugins-2.0]# make install
4] Assign nagios user ownership to nagios commands.
[root@server nagios-plugins-2.0]# chown -R nagios:nagios /usr/local/nagios/libexec
5] Install and configure NRPE nagios client.
[root@server downloads]# wget http://downloads.sourceforge.net/project/nagios/nrpe-2.x/nrpe-2.15/nrpe-2.15.tar.gz?r=&ts=1363788540&use_mirror=hivelocity
[root@server downloads]# tar -xvzf nrpe-2.15.tar.gz
[root@server downloads]# cd nrpe-2.15.tar.gz
[root@server downloads]# ./configure –enable-ssl
[root@server nrpe-2.15]# make all
[root@server nrpe-2.15]# make install-plugin
[root@server nrpe-2.15]# make install-daemon
[root@server nrpe-2.15]# make install-daemon-config
[root@server nrpe-2.15]# make install-xinetd
6] Add following line at the end of file for NRPE in /etc/services
[root@server ~]# vi /etc/services
nrpe 5666/tcp # NRPE
7] NRPE will run under xinetd daemon. So update xinetd file.
[root@server ~]# vi /etc/xinetd.d/nrpe
# default: on
# description: NRPE (Nagios Remote Plugin Executor)
service nrpe
{
flags = REUSE
socket_type = stream
port = 5666
wait = no
user = nagios
group = nagios
server = /usr/local/nagios/bin/nrpe
server_args = -c /usr/local/nagios/etc/nrpe.cfg –inetd
log_on_failure += USERID
disable = no
only_from = 127.0.0.1 192.168.1.1 –> [ Your Nagios Server IP ]
}
8] Star/Restart xinetd service.
[root@server ~]# service xinetd start
[root@server ~]# chkconfig xinetd on