Prerequisite install
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 copy files to /tmp
Extract files
cd /tmp tar zxvf nrpe-2.15.tar.gz tar zxvf nagios-plugins-1.5.tar.gz
groupadd nagios useradd -d /var/log/nagios -g nagios -m -p somepassword nagios date|md5sum|cut -b "1-10" | passwd --stdin nagios id nagios
cd nagios-plugins-1.5 ./configure make make install chown -R nagios:nagios /usr/local/nagios
cd nrpe-2.15 ./configure 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 = 127.0.0.1@only_from = 127.0.0.1 10.50.60.0/24 204.67.86.0/24@' /etc/xinetd.d/nrpe
Add the NRPE daemon to services
echo "nrpe 5666/tcp # NRPE" >> /etc/services service xinetd restart
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 127.0.0.1
Should return NRPE v2.15
Copy any additional plugins to /usr/local/nagios/libexec/
such as check_linux_stats.pl
Nagios Core, Nagios NRPE Deamon and Nagios Plugin Locations
/usr/local/nagios/libexec/check_nrpe
/etc/xinetd.d/nrpe
/usr/local/nagios/etc/nrpe.cfg
/etc/nagios3/conf.d/
/usr/lib/nagios/plugins
/etc/nagios/nrpe.cfg
/usr/lib64/nagios/plugins/
Install Sys:Statistics:Linux
via CPAN