Page 1 of 1

CHECK_NRPE: Received 0 bytes from daemon. Check the remote

Posted: Mon Jun 11, 2018 7:37 am
by martinkuriax
We are getting the error below when adding aurgment on our check_nrpe commad

"CHECK_NRPE: Received 0 bytes from daemon. Check the remote server logs for error messages."

When starting or stopping nrpe we are getting the error below
# service nrpe restart
Redirecting to /bin/systemctl restart nrpe.service
Failed to restart nrpe.service: Unit not found.

but xinetd works ok

# service xinetd restart
Redirecting to /bin/systemctl restart xinetd.service

the commands below work ok

# /usr/local/nagios/libexec/check_nrpe -H nagioscentosserver -c check_load
OK - load average: 1.06, 1.58, 1.88|load1=1.060;15.000;30.000;0; load5=1.580;10.000;25.000;0; load15=1.880;5.000;20.000;0;

# /usr/local/nagios/libexec/check_nrpe -H nagioscentosserver -c check_users
USERS OK - 2 users currently logged in |users=2;5;10;0

but this returns and error

# /usr/local/nagios/libexec/check_nrpe -H nagioscentosserver -t 30 -c check_init_service -a 'httpd'
CHECK_NRPE: Received 0 bytes from daemon. Check the remote server logs for error messages.

Should we Enable check_nrpe command arguments by configuring NRPE with –enable-command-args

Kind advise

Re: CHECK_NRPE: Received 0 bytes from daemon. Check the rem

Posted: Mon Jun 11, 2018 1:37 pm
by cdienger
This will occur if the nrpe.cfg has the check_init_services command commented out with a #. Open /usr/local/nagios/etc/nrpe.cfg on the machine running the nrpe agent, and check for:

command[check_init_service]=/usr/local/nagios/libexec/check_init_service $ARG1$

making sure a # isn't in the front. If there is or if you make any other changes to the file, make sure to restart the xinetd service afterward:

service xinetd restart

Re: CHECK_NRPE: Received 0 bytes from daemon. Check the rem

Posted: Tue Jun 12, 2018 8:30 am
by martinkuriax
I have decided to reinstall nagios xi we see whether it will clear the issue thanks