Install Nagios Plugin and NRPE on Redhat

Prerequisite install

  • xinetd
  • openssl-devel

Redhat 3rd party libraries if added to yum can let you install nrpe via yum. However, below is an explanation of now to compile this locally.

Download and Extract files

Download and copy files to /tmp

  • nrpe-2.15.tar.gz
  • nagios-plugins-1.5.tar.gz

Extract files

cd /tmp
tar zxvf nrpe-2.15.tar.gz
tar zxvf nagios-plugins-1.5.tar.gz

Create nagios Account

groupadd nagios
useradd -d /var/log/nagios -g nagios -m -p somepassword nagios
date|md5sum|cut -b "1-10" | passwd --stdin nagios
id nagios

Install the Nagios Plugins

cd nagios-plugins-1.5
make install
chown -R nagios:nagios /usr/local/nagios

Install the NRPE daemon

cd nrpe-2.15
make all
make install-plugin
make install-daemon
make install-daemon-config
make install-xinetd

chown -R nagios:nagios /usr/local/nagios

Update nagios server IP address here. Included additional IP separated by spaces.

grep only /etc/xinetd.d/nrpe

Use the following example to replace easily!

sed -i 's@only_from       =       =' /etc/xinetd.d/nrpe

Add the NRPE daemon to services

echo "nrpe            5666/tcp                # NRPE" >> /etc/services
service xinetd restart

Test NRPE daemon

Check for Listening port

netstat -at | grep nrpe

should have output as

tcp        0      0 *:nrpe                      *:*                         LISTEN

Run the call to service

/usr/local/nagios/libexec/check_nrpe -H

Should return NRPE v2.15

Additional plugins

Copy any additional plugins to /usr/local/nagios/libexec/ such as

File locations

Nagios Core, Nagios NRPE Deamon and Nagios Plugin Locations

Compiled Version

Plugins (executables)


NRPE Deamon config file (settings)


NRPE Config file (commands)



Core Nagios Monitoring config directory (settings)


Plugin Location (executables)



NRPE Config file (commands)


Plugin Location


Install Sys:Statistics:Linux via CPAN


QR Code
QR Code tech:linux:install_nagios_plugin_nrpe_redhat (generated for current page)