Page 1 of 3

return code ??? out of bounds

Posted: Mon Jun 06, 2016 1:39 pm
by jssingh
What does it mean when a nagios plugin seemingly randomly has the output:

Code: Select all

return code ??? out of bounds
when the return code is always different? The plugin itself only returns the nagios-approved values of 0,1,2 or 3. And most of the time it has valid output, but the random outputs are happening often enough to be annoying.

This is the different return codes we've gotten in the past week:
214
191
143
215
124
221
135
110

Re: return code ??? out of bounds

Posted: Mon Jun 06, 2016 4:58 pm
by tmcdonald
I'll be able to dig more into this later in the week, but when I see codes >128 I tend to reference this:

http://www.tldp.org/LDP/abs/html/exitcodes.html

Sorry for the lack of info, hectic Monday!

Re: return code ??? out of bounds

Posted: Mon Jun 06, 2016 5:17 pm
by jssingh
Thanks for the documentation however it only covered 2 of the codes.

When things are less hectic, please take a look and let me know what you think.

thanks!

Re: return code ??? out of bounds

Posted: Tue Jun 07, 2016 8:53 am
by rkennedy
For reference, which plugin is returning values like this?

Re: return code ??? out of bounds

Posted: Tue Jun 07, 2016 9:05 am
by eloyd
Is it a Nagios plugin or one of your magic star cluster plugins?

Re: return code ??? out of bounds

Posted: Tue Jun 07, 2016 2:34 pm
by tmcdonald
Yea, if it's code you can share I can do a little more, but my Google-fu is failing me for finding the exact link I was hoping to share.

Re: return code ??? out of bounds

Posted: Tue Jun 07, 2016 4:50 pm
by Box293
I just wanted to post my 2 thoughts about this, they're not entirely helpful though ...

I've often wondered why Nagios doesn't return the corresponding result that came with the unexpected return code. It would make troubleshooting so much easier. You think I should make a feature request for this?

Re: return code ??? out of bounds

Posted: Tue Jun 07, 2016 4:57 pm
by jssingh
I've always found the "return code ..." error to be unhelpful, so anything that provides more info would be a good idea.

The plugin I'm writing about is a custom plugin, but not one I wrote so I'm not very familiar with what it's doing. I'll need to find out if I can post it.

Re: return code ??? out of bounds

Posted: Tue Jun 07, 2016 5:01 pm
by lmiltchev
The plugin I'm writing about is a custom plugin, but not one I wrote so I'm not very familiar with what it's doing. I'll need to find out if I can post it.
Posting the plugin should help. We can test it in-house and suggest a possible solution/workaround.

Re: return code ??? out of bounds

Posted: Tue Jun 07, 2016 5:11 pm
by eloyd
If you can share it, I would love to see it. Scripts that return changing results are very interesting to me.