We use cookies to ensure that we give you the best experience on our website.  Visit our Privacy Policy to learn more. If you continue to use this site, we will assume that you are okay with it.

Your choices regarding cookies on this site.
Your preferences have been updated.
In order for the changes to take effect completely please clear your browser cookies and cache. Then reload the page.

Werk #1409: Extended Check_MK-API: check function may return None

ComponentChecks & Agents
TitleExtended Check_MK-API: check function may return None
Date2014-09-30 08:21:57
Checkmk EditionCheckmk Raw Edition (CRE)
Checkmk Version1.2.5i6
LevelProminent Change
ClassNew Feature
CompatibilityCompatible - no manual interaction needed

A check function may now return None (or simply end without returning anything). This will no longer create an exception but return state UNKNOWN and - depending on the type of the check - one of the following outputs:

Item not found in SNMP data

Item not found in agent output

This means that for the typical check that loops through the agent output looking for its item now does not need to manually do a

return 3, "Something not found in agent output"

anymore. This is now the default case. This has several advantages:

  • You save some code in the check implementation.
  • The output of the various checks is unified.
  • A future Check_MK version can easily have a rule for changing the state in such cases from UNKNOWN to WARN or CRIT.