|Komponente||Checks & Agents|
|Titel||local: New state type P for state computation based on perfdata|
|Checkmk Edition||Checkmk Raw Edition (CRE)|
|Kompatibilität||Kompatibel - benötigt kein manuelles Eingreifen|
The section <<<local>>> now allows a new state marker P (next to 0, 1, 2 and 3). When setting this marker, the check plugin computes the state according to the levels contained in the performance data. Take the following example:
<<<local>>> P Environment temp=30;28;35|humidity=33;40:60;35:70;0;100 This is a text
The check will first check the variable temp. It's current value is 30. The levels are at 28 and 35 for warning and critical, resp. Because 30 is greater then 28 this will trigger a warning.
The second performance value humidity has both lower and upper levels for warning and critical - separated by a colon. The current value is 33, which is lower than the lower critical level of 35. This will make this variable und thus the total check critical.
- It is allowed to use fractional values like 35.12.
- If the current value exactly matches a level, the better state is being used. This is not consistent with the usual levels in Check_MK checks, but is neccessary if you want to have just one single value to be OK.
- When using P then the current values of all variables are appended to the plugin output. If you want you can omit the your additional text at all in that case.
- When you use P and do not supply performance data or do not supply levels, the status will always be OK.
Example for a local line without a text:
<<<local>>> P Environment temp=30;28;35|humidity=33;40:60;35:70;0;100
The output will be:
CRIT - temp 30.0 > 28.0(!), humidity 33.0 < 35.0(!!)