Werk #16711: Changed format of host tag conditions in notifications.mk configuration file

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

The internal data format of the Checkmk notification rule definitions, normally configured via Setup "Notifications" 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 notifications.mk files manually or via script to define the notification_rules configuration options, you will likely have to change your scripts or at least the configuration files.

A notification rule definition with it's tag conditions in the old format looks like this:

F+:notifications.mk notification_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+:notifications.mk: notification_rules += [ { "description": "Rule description", ..., "match_hosttags": { "agent": "cmk-agent", "criticality": "prod", "networking": "lan", "piggyback": "piggyback", "snmp_ds": "no-snmp", }, ..., } ] F-:

In the match_hosttags 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