[//]: # (werk v2)
# Changed format of host tag conditions in alert_handlers.mk configuration file
key | value
---------- | ---
date | 2024-06-10T08:36:41+00:00
version | 2.4.0b1
class | feature
edition | cee
component | setup
level | 1
compatible | yes
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 <tt>alert_handler_rules</tt> 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 <tt>alert_handler_rules</tt> dictionary the keys are the tag groups
(as
defined in Setup) and the values are the tags configured for each group.