Page 1 of 3
"CHECK_NRPE: Received 0 bytes from daemon" error message
Posted: Tue Jun 13, 2017 1:16 am
by RIDS_I2MP
Hi Team,
I am trying to monitor an AIX server using Nagios.
Have successfully installed NRPE on the remote host. But unable to monitor the parameters receiving below mentioned message:
"CHECK_NRPE: Received 0 bytes from daemon. Check the remote server logs for error messages."
NRPE is running on remote host:
NON-PROD> nagios@remotehost: /var/log > ps -ef | grep nrpe
nagios 17956970 1 0 Jun 07 - 0:22 /usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -d
NRPE check from Nagios XI server is also running fine
[nagios@nagiosserver libexec]$ ./check_nrpe -H <remotehostIP>-p 5666
NRPE v2.12
'check_disk' script is running fine on remote host
NON-PROD> nagios@remotehost: /usr/local/nagios/libexec > ./check_disk -w 10% -c 15% -p '/home'
DISK OK - free space: /home 61 MB (96% inode=99%);| /home=2MB;57;54;0;64
From Nagios XI the check is resulting error
[nagios@nagiosserver libexec]$ ./check_nrpe -H <remotehostip> -t 30 -c check_disk -a '-w 10% -c 15% -p /home'
CHECK_NRPE: Received 0 bytes from daemon. Check the remote server logs for error messages.
We have mentioned don't_blame_nrpe=1 in the nrpe.cfg file on remote host.
Kindly suggest, why are we receiving the above error.
Re: "CHECK_NRPE: Received 0 bytes from daemon" error message
Posted: Tue Jun 13, 2017 9:36 am
by lmiltchev
Did you restart nrpe on the remote box after setting: "don't_blame_nrpe=1"?
Can you show us how "check_disk" is configured on the client?
Can you pass arguments to check_nrpe, when running it locally (on the remote box)?
Example:
Code: Select all
/usr/local/nagios/libexec/check_nrpe -H localhost -c check_disk -a '-w 10% -c 15% -p /home'
Re: "CHECK_NRPE: Received 0 bytes from daemon" error message
Posted: Wed Jun 14, 2017 12:52 am
by RIDS_I2MP
Hi Team,
I have restarted the NRPE service after updating the nrp.cfg file with 'don't_blame_nrpe=1'
"check_disk" configuration in the nrpe.cfg file on remote host:
check_disk on remote host.PNG
I commented the hardcoded "check_disk" command in the nrpe file and tried executing below mentioned command from Nagios Xi server but receiving same output(didn't succeeded):
[nagios@nagiosserver libexec]$ ./check_nrpe -H <remotehostIp>-t 30 -c check_disk -a '-w 10% -c 15% -p /home'
CHECK_NRPE: Received 0 bytes from daemon. Check the remote server logs for error messages.
I have tried executing the below command by passing the arguments on the remote host, receiving below output:
NON-PROD> nagios@remotehost: /usr/local/nagios/libexec > ./check_nrpe -H <remotehostIp>-t 30 -c check_disk -a '-w 10% -c 15% -p /home'
CHECK_NRPE: Received 0 bytes from daemon. Check the remote server logs for error messages.
Re: "CHECK_NRPE: Received 0 bytes from daemon" error message
Posted: Wed Jun 14, 2017 9:44 am
by lmiltchev
Do you have "check_disk" configured in some other file, i.e. common.cfg? The command on the screenshot is commented out. It shouldn't be working at all... If you are passing this:
as one argument, then your "check_disk" command on the client should look like this:
Code: Select all
command[check_disk]=/usr/local/nagios/libexec/check_disk $ARG1$
Re: "CHECK_NRPE: Received 0 bytes from daemon" error message
Posted: Mon Jun 19, 2017 5:50 am
by RIDS_I2MP
I am not able to find "check_disk" entry on remote host (i.e. unable to find command.cfg on remote host)
yet the command is working locally on the remote host but not from Nagios server.
Kindly suggest.
Re: "CHECK_NRPE: Received 0 bytes from daemon" error message
Posted: Mon Jun 19, 2017 10:14 am
by lmiltchev
It's possible that check_disk is defined in common.cfg, NOT command.cfg on the remote host. A typical location would be: "/usr/local/nagios/etc/nrpe/common.cfg".
Re: "CHECK_NRPE: Received 0 bytes from daemon" error message
Posted: Mon Jun 19, 2017 11:35 pm
by RIDS_I2MP
Hi Team,
There is no folder named nrpe and file named common.cfg on remote host at /usr/local/nagios/etc/
Kindly let me know the reason why I am not able to execute the commands to check disk utilization from Nagios server, whereas check is successful locally on remote host.
Re: "CHECK_NRPE: Received 0 bytes from daemon" error message
Posted: Tue Jun 20, 2017 9:12 am
by lmiltchev
Try the following - open the nrpe.cfg on the client machine in a text editor and check this line:
Code: Select all
#command[check_disk]=/usr/local/nagios/libexec/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$
to this:
Code: Select all
command[check_disk]=/usr/local/nagios/libexec/check_disk $ARG1$
Save and exit. Kill the NRPE process, and start the agent:
Code: Select all
killall nrpe
/usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -d
Test it by running the following command on the Nagios XI server:
Code: Select all
/usr/local/nagios/libexec/check_nrpe -H <remotehostIp> -t 30 -c check_disk -a '-w 10% -c 15% -p /home'
Re: "CHECK_NRPE: Received 0 bytes from daemon" error message
Posted: Wed Aug 09, 2017 12:07 am
by RIDS_I2MP
Hi Team,
Kindly refer the attached snapshot of a part of nrpe.cfg file.
nrpe.cfg file.PNG
1. File consists two lines for 'check_disk' command, one is with arguments ARG1, ARG2 and ARG3 but line is commented so has no significance other line for check_disk command consists of only one argument variable I.e. ARG1 which has significant.
2. I have killed the nrpe the service and restarted it but still no luck, unable to monitor from Nagios XI.
Kindly suggest.
Re: "CHECK_NRPE: Received 0 bytes from daemon" error message
Posted: Wed Aug 09, 2017 3:20 pm
by tgriep
Can you login to the remove server, run the following as root and post the output?
Code: Select all
grep -e ^dont /usr/local/nagios/etc/nrpe.cfg
Another reason for this to fail is if the NRPE Agent was compiled without arguments enabled, that would make the check fail as arguments are not compiled in to the binary.
I suggest installing the newest NRPE agent on that system and see if that works better that the one you are running.
https://support.nagios.com/kb/article/n ... ource.html