$ /usr/local/nagios/libexec/check_nrpe -H localhost
CHECK_NRPE: Error - Could not complete SSL handshake.
This command doesn't work because (most likely) NRPE is only listening on IPv6. Try adding the following to "only_from" line in /etc/xinetd.d/nrpe:
only_from = ::1 127.0.0.1 10.10.83.90 10.10.83.97
and restart xinet, so that changes can take effect:
Test your check again. Is it working now?
$ /usr/local/nagios/libexec/check_nrpe -nH localhost
CHECK_NRPE: Error receiving data from daemon.
This is not going to work as you are telling NRPE not to use SSL by passing "-n".
$ /usr/local/nagios/libexec/check_nrpe -H 127.0.0.1
NRPE v2.15
This works as expected, however you are using a very old agent. I would recommend that you upgrade to NRPE v3. The way to do this would be to remove NRPE completely out of your system, then use our official Linux agent installer:
https://assets.nagios.com/downloads/nag ... _Agent.pdf
Note: I would like to point out that you don't have a "typical", vanilla setup. I see IP entries in both, the /usr/local/nagios/etc/nrpe.cfg and /etc/xinetd.d/nrpe file... It seems like that NRPE on your system is running under xinetd, just by looking at this:
ps -ef | grep nrpe | grep -v grep
{not found}
Keep in mind that NRPE can run either under xinetd or as a "standalone" daemon, but not as both...
I see many "non-standard" files on this system. Are you using puppet to manage nrpe configs? What is the purpose of this file - /usr/lib/firewalld/services/nrpe.xml? NRPE is running under xinetd, but you also have a service set up:
/usr/lib/systemd/system/nrpe.service
So, if you don't want to install a newer version of NRPE, then we can continue troubleshooting your existing setup.
1. Make sure that your Nagios XI server's IP address is one of the IPs, listed in the /etc/xinetd.d/nrpe file. If you are making any changes to the file, you would need to restart xinetd, so that changes can take effect.
2. Test connectivity from the Nagios XI server by running:
Code: Select all
/usr/local/nagios/libexec/check_nrpe -H <client ip>
/usr/local/nagios/libexec/check_nrpe -2 -H <client ip>
nmap <client ip> -p 5666