Page 2 of 2

Re: CHECK_NRPE: Received 0 bytes from daemon

Posted: Wed Apr 06, 2016 5:01 am
by rambertnala
Hi friend.

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

this is the oputput...

Regards

Re: CHECK_NRPE: Received 0 bytes from daemon

Posted: Wed Apr 06, 2016 1:49 pm
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?

Re: CHECK_NRPE: Received 0 bytes from daemon

Posted: Wed Apr 06, 2016 1:54 pm
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]#