I would expect Nagios to return -1, or 3 for "system14;UP;HARD;1;(No output!)"

Michael Alger nagios at mm.quex.org
Wed Feb 8 04:42:26 CET 2006


leefitzg at aol.com wrote:
>
> I have a most perplexing couple of issues:
> ----  Nagios appears to be returning '1' and this is causing an 
> erroneous system UP notification
> -  seems like is should be returning -1, or 3  = UNKNOWN   which I 
> would assume would not translate to system UP
>
> 0203 0426 05 [1138969565] HOST ALERT: system14;UP;HARD;1;(No output!)
> 0203 0426 05 [1138969565] HOST NOTIFICATION: 
> mtools;system14;UP;host-notify-by-mknotify;(No output!)

To the best of my understanding, the Nagios status is taken directly 
from the /return value/ of the check command. So in your case, it seems 
like the check_ping plugin is not producing any output but still 
returning a status code of 0. I'm not sure if Nagios reads the stderr or 
just stdout; I think it might be just stdout, in which case it might be 
printing diagnosis messages to its error stream. Regardless, the plugin 
output is essentially ignored by Nagios - it's only ever displayed to 
the end user.

Basically, the plugin shouldn't be returning 0 unless the host is up. It 
should also be producing some sort of output.


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642




More information about the Developers mailing list