Werk #16287: rule_notification: match_hosttag now accepts custom tag ids
Komponente | REST API | ||||
Titel | rule_notification: match_hosttag now accepts custom tag ids | ||||
Datum | 12.01.2024 | ||||
Level | Kleine Änderung | ||||
Klasse | Bugfix | ||||
Kompatibilität | Inkompatibel - Manuelle Interaktion könnte erforderlich sein | ||||
Checkmk versions & editions |
|
Previously, when creating or updating a notification rule, the match_host_tag field would only allow for builtin tag ids. With this werk we now accept any configured host tag id. The schema has also changed in order to make this possible. This means that instead of a field representing each tag, you now have to pass a list of aux tag ids/tag group tag ids along with an operator. This way we can determine if the tag id should match or not.
e.g.
{
"match_host_tags": {
"state": "enabled",
"value": [
{
"tag_type": "aux_tag",
"tag_id": "snmp",
"operator": "is_set",
},
{
"tag_type": "tag_group",
"tag_group_id": "criticality",
"operator": "is",
"tag_id": "prod",
},
{
"tag_type": "tag_group",
"tag_group_id": "networking",
"operator": "is_not",
"tag_id": "lan",
}
],
},
}