CHECK_NRPE: Received 0 bytes from daemon

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.
rambertnala
Posts: 70
Joined: Fri Feb 26, 2016 7:15 am

Re: CHECK_NRPE: Received 0 bytes from daemon

Post by rambertnala »

Hi friend.

I (0.4.3.143 2015-04-29) seem to be doing fine...

this is the oputput...

Regards
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: CHECK_NRPE: Received 0 bytes from daemon

Post by lmiltchev »

It is possible that the timeout is indeed the issue. If the script doesn't take more than a minute to run, try adding the following line to the nsclient.ini (under the default settings & nrpe sections):

Code: Select all

timeout = 60
Restart the nsclient++ service and test your command again. Did this help?
Be sure to check out our Knowledgebase for helpful articles and solutions!
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: CHECK_NRPE: Received 0 bytes from daemon

Post by rkennedy »

I have a feeling it is the timeout, or your .bat file is failing somewhere. I setup a similar test, and it worked without issues.

In nsclient.ini -

Code: Select all

restart_fw = scripts\custom\restart_fw.bat
In restart_fw.bat -

Code: Select all

@echo off
net stop MpsSvc
timeout /t 10
net start MpsSvc
echo Firewall Restarted!
From Nagios -

Code: Select all

[root@localhost libexec]# ./check_nrpe -H 192.168.5.47 -c restart_fw
The Windows Firewall service is stopping.
The Windows Firewall service was stopped successfully.

ERROR: Input redirection is not supported, exiting the process immediately.
The Windows Firewall service is starting.
The Windows Firewall service was started successfully.

Firewall Restarted!
[root@localhost libexec]#
Former Nagios Employee
Locked