NagiosSideChecks

NagiosSideChecks ================

This patch is dedicated for nagios 3.X. It gives us possibility to define thresholds on nagios side (for active and passive checks).

There are 3 main macros, that needs to be set.

 EXT_CHECK - enables nagios side checks (plugin is active only in defined time period - since version 1.2.7)
 EXT_ERR - defines threshold for error level
 EXT_ERR_MSG - defines error messagess
 EXT_WARN - defines threshold for warning level
 EXT_WARN_MSG - defines warning messagess 
 EXT_IGNORE_MISSING - defines if unknown conditions should be ignored

example:

 EXT_CHECK=TRUE (false is default)
 EXT_ERR=load1>2|load5>5
 EXT_ERR_MSG=Load1 is to high: %s|NULL
 EXT_WARN=load1>1|load5>3
 EXT_WARN_MSG=NULL|Load5 is in warning state

Plugin output:

OK - load average: 1.12, 0.73, 0.71 | load1=1.120;4.000;6.000;0; load5=0.073;3.000;5.000;0; load15=0.710;2.000;4.000;0;

After check on nagios side result will be changed to:

Parameter load1=1.120 reached limit load1 gt 1 | load1=1.120;4.000;6.000;0; load5=0.073;3.000;5.000;0; load15=0.710;2.000;4.000;0;

For plugin output:

 OK - load average: 2.12, 0.73, 0.71 | load1=2.120;4.000;6.000;0; load5=0.073;3.000;5.000;0; load15=0.710;2.000;4.000;0;

After check on nagios side result will be changed to:

Load1 is to high: 2.120 | load1=1.120;4.000;6.000;0; load5=0.073;3.000;5.000;0; load15=0.710;2.000;4.000;0;

Values are taken from output data of the plugin (before and after pipe). Values are in performance data format.

Output data is rewritten to message defined in header file (preserving original performance data)