[Nagiosplug-devel] Writing a new plugin, having a strange bug.
jhmartin at toger.us
Fri Sep 19 03:51:10 UTC 2008
On Thu, Sep 18, 2008 at 04:21:43PM -0500, Jason Reynolds wrote:
> simply that when my plugin's return code is 1, 2, or 3, Nagios still shows
> the service as "OK". I have verified the plugin's
> return code by executing it myself, then using echo $? from the command
> line, showing the return code.
Please post your command definition, including NRPE
configuratino for same. It sounds like you aren't executing the
plugin you think you are, or there is a wrapper that is losing
the return code somewhere along the way.
if [ $? -ne 0 ]; then
echo oh no!
The above always returns 0 since the script will end up
returning the exit code of echo if $? is not 0. It is good that
you are checking $? while testing the plugin, so it sounds like
it is something upstream of it.
This message is PGP/MIME signed.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 219 bytes
Desc: not available
More information about the Nagiosplugin-devel