Werk #16712: Changed format of host tag conditions in alert_handlers.mk configuration file

Component Setup, site management
Title Changed format of host tag conditions in alert_handlers.mk configuration file
Date Jun 10, 2024
Level Trivial Change
Class New Feature
Compatibility Compatible - no manual interaction needed
Checkmk versions & editions
2.4.0b1 Checkmk Enterprise (CEE), Checkmk Cloud (CCE), Checkmk MSP (CME)

The internal data format of the Checkmk alert handler rule definitions, normally configured via Setup "Alert handlers" page, has been changed.

If you only use Setup for configuring Checkmk this change will not be relevant for you, since the data format will be changed automatically during update to 2.4x.

In case you edit alert_handlers.mk files manually or via script to define the alert_handler_rules configuration options, you will likely have to change your scripts or at least the configuration files.

An alert handler rule definition with it's tag conditions in the old format looks like this:

F+:alert_handlers.mk alert_handler_rules += [ { "description": "Rule description", ..., "match_hosttags": ["my-host|cmk-agent|prod|lan|piggyback|no-snmp"], ..., } ] F-:

The tags that should match are in list format, separated via pipe characters. There is no information about the tag group the configured tag is related with.

The new structure looks like this:

F+:alert_handlers.mk: alert_handler_rules += [ { "description": "Rule description", ..., "match_hosttags": { "agent": "cmk-agent", "criticality": "prod", "networking": "lan", "piggyback": "piggyback", "snmp_ds": "no-snmp", }, ..., } ] F-:

In the alert_handler_rules dictionary the keys are the tag groups (as defined in Setup) and the values are the tags configured for each group.

To the list of all Werks