Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
The nrpe.cfg file does have the 127.0.0.1 address so that is not it.
Is the firewall setup to allow inbound traffic on port 5666?
Can you run the following commands and post the output?
nmap 127.0.0.1 -p 5666
Starting Nmap 6.40 ( http://nmap.org ) at 2017-04-05 14:41 UTC
Nmap scan report for localhost (127.0.0.1)
Host is up (0.000027s latency).
PORT STATE SERVICE
5666/tcp closed nrpe
Nmap done: 1 IP address (1 host up) scanned in 0.08 seconds
The output of the nmap and netstat command shows that the NRPE Agent is not running on the server so that is why it is failing.
Since there is not a startup script on your server, you would have to run the Agent in daemon mode by running the following.
Install prerequisites:
yum install mod_ssl openssl-devel gcc make openssl perl
yum install -y gcc glibc glibc-common openssl-devel perl wget
sudo wget http://liquidtelecom.dl.sourceforge.net/project/nagios/nrpe-3.x/nrpe-3.0.1.tar.gz
sudo tar xzf nrpe-3.0.1.tar.gz
cd nrpe-3.0.1
sudo make install-groups-users
./configure --enable-command-args --with-ssl-lib=/usr/lib/x86_64-linux-gnu/
sudo make all
sudo make install
sudo make install-config
sudo make install-plugin
sudo make install-daemon
sudo iptables -I INPUT -p tcp --destination-port 5666 -j ACCEPT
sudo service iptables save
sudo /usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -d
Test it:
/usr/local/nagios/libexec/check_nrpe -H 127.0.0.1
Result:
NRPE v3.0.1
And I Kill the process and then run the last command to restart.
The missing part from our discussion yesterday is that the last time I installed it, I ran make install-plugin and make install-daemon which installed the daemon and it starts properly afterwards without running xinetd.