Page 1 of 1

Re: [Nagios-devel] Discrepancy in host and service check

Posted: Tue May 27, 2008 11:29 pm
by Guest
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 [email protected]
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231





This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]