NRPE unable to read output default return : expected ERROR ?

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.
Locked
laurent55
Posts: 2
Joined: Mon May 12, 2014 11:49 am

NRPE unable to read output default return : expected ERROR ?

Post 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 !
Last edited by laurent55 on Mon May 12, 2014 12:41 pm, edited 1 time in total.
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

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

Post 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.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
laurent55
Posts: 2
Joined: Mon May 12, 2014 11:49 am

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

Post by laurent55 »

true.

I'm speechless, it's obvious :o
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

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

Post by abrist »

Can you post the custom script? Then we could help troubleshooting the status string/exit code weirdness.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked