Compiling and installing Nagios plugin
Nagios plugins are executed via NRPE (Nagios remote plugin executor) client at host side. Whatever output comes fromĀ Nagios plugins the NRPE plugin converts it into format understood by Nagios to which the server takes necessary actions.
First xinetd service needs to be installed
yum install xinetd -y
Installing NRPE plugin -
cd /root/nagios
wget https://github.com/NagiosEnterprises/nrpe/releases/download/nrpe-3.2.1/nrpe-3.2.1.tar.gz
tar xzf nrpe-3.2.1.tar.gz
cd nrpe-3.2.1
./configure
make all
make install-plugin; make install-daemon;make install-daemon-config
make install-xinetd
vim /etc/xinetd.d/nrpe
edit following lines -
only_from = 127.0.0.1 localhost
vim /etc/services
nrpe 5666/tcp NRPE
service xinetd restart
Verifying the process via ps aux|grep nrpe or netstat -ntlp|grep nrpe