How does nagios handle plugin exit not in [0, 1, 2, 3]?

Hendrik Baecker andurin at process-zero.de
Fri Apr 20 19:00:09 CEST 2007


Hi John,

John Rouillard schrieb:
> Hi all:
> 
> How does nagios handle plugins that don't exit with an errorcode of 0,
> 1, 2, or 3?  If the plugin exits with say 127, is the host check logic
> triggered?

Its triggered by every service check that does not return with return
code 0.

> 
> The reason I ask is that I just fixed ~10 services (that were run
> every 3 minutes) that were failing (java was missing from the system),
> and the average latency went from 2 minutes to less than 6 seconds
> (usually in the .6 range), with the max at 25 seconds. This seems a
> huge difference given the fix.
> 
> I could almost buy it if each failure triggered a halt to polling and
> forced it to do host checks, but even then the magnitude of the change
> is a bit unbelievable.

Host checks goes to a high prio scheduling queue and are checked before
other service checks to determine if nagios should write x service alert
or just a single host alert.
Cause of the high prio host checks your service checks may go into latency.

> 
> If the failure (w/ exit code 127) would trigger host checking, should
> the logic change to do host checking only when the plugin exits with a
> status in the [0-3] range since it is an invalid exit code?

Until now the nagios law is: A possible failure is a non-OK State.
The exit codes are under control of each plugin.
As long as each plugin exits in the defined return code range all is ok.

Why do you think there should be an exception for exit code 127?

Best wishes
Hendrik

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/




More information about the Developers mailing list