Discrepancy in host and service check result processing
Luke Ross
l-ross at northwestern.edu
Tue May 27 18:06:26 CEST 2008
I noticed that Nagios uses slightly different code for checking
results from service checks vs. host checks. Specifically, for
service checks there is extra code that checks to see if the plugin
terminated abnormally:
if(WEXITSTATUS(pclose_result)==0 && WIFSIGNALED(pclose_result))
check_result_info.return_code=128+WTERMSIG(pclose_result);
This extra code is not present for host checks.
In my testing I've found that this seems to prevent Nagios from
noticing if a host check plugin crashes: it keeps the status as OK
and sets the message to "(null)", and the host check doesn't get
rescheduled. In contrast, if a service check plugin crashes, it sets
the status to CRITICAL and sets the message to something like
"(Return code of 137 is out of bounds)".
Is there a reason why the host check processing doesn't have this
extra check, or is this just an oversight?
Thanks,
Luke
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
More information about the Developers
mailing list