How to remove Nagios CHECK_NRPE: Received 0 bytes from daemon.

Overview

If you receive this error the first thing you should be doing is to check the server logs for error messages regarding NRPE. NRPE would complain about any issue that it encounters in the log file.

tail -f /var/log/messages

The most common error you may find is the check_nrpe plugin was unable to complete an SSL handshake with the NRPE daemon. Make sure that nrpe plugin was compiled with ssl option enabled on the monitoring and remote host.  If you’re running a commercial version of SSL on the remote host, there might be some compatibility problems.

Make sure openssl-devel is installed


rpm -qa | grep openssl-devel

If it is not installed then install it and recompile the nrpe daemon with


yum install openssl-devel

for debian/ubuntu


apt-get install libssl-dev