From: Michael A. <na...@mm...> - 2006-02-08 03:42:37
|
lee...@ao... 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. |