Discrepancy in host and service check result processing

Andreas Ericsson ae at op5.se
Wed May 28 09:29:56 CEST 2008


Luke Ross wrote:
> 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?
> 

I'm 99% certain it's an oversight.

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

-------------------------------------------------------------------------
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