[Nagios-devel] Discrepancy in host and service check result

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

[Nagios-devel] Discrepancy in host and service check result

Post by Guest »

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 post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Locked