Page 1 of 1

NRPE unable to read output default return : expected ERROR ?

Posted: Mon May 12, 2014 11:55 am
by laurent55
Hi

I'm usign a custom plugin executed through NRPE, and it returns the famous "NRPE: Unable to read output".
Ok, my script doesn't returns anything so I accept the NRPE thing.

But why do I have a 0 exit code ? Shouldn't I expect 2 ?

Do I have a way to force return 2 if I have the "unable to read output" return ?
(for me it's an error, even if it's on the plugin side)

Thanks !

Re: NRPE unable to read output default return : expected ERR

Posted: Mon May 12, 2014 12:15 pm
by sreinhardt
Both the status message and exit codes are relayed back directly from your plugin, with the exception that you found, of a lack of status message will result in that error. However if your plugin is relaying an exit code of 0, I would not expect nrpe to alter it, especially considering it's entirely possible that you have no need for status message output and just want to view the exit codes. If you would like this to return a 2(critical) I would suggest having your plugin exit that way.

Re: NRPE unable to read output default return : expected ERR

Posted: Mon May 12, 2014 12:31 pm
by laurent55
true.

I'm speechless, it's obvious :o

Re: NRPE unable to read output default return : expected ERR

Posted: Mon May 12, 2014 12:41 pm
by abrist
Can you post the custom script? Then we could help troubleshooting the status string/exit code weirdness.