Using CheckMK for a while now which works very well.
When trying to setup a flexible notification, I am encountering the following problem.
Situation:
My Hosts are tagged with “Host labels” (e.g. “mqtt:ima” )
Active Checks (e.g. HTTP check) are assigned to Host Labels.
In this example: An active HTTP checks is executed for all hosts tagged with “mqtt:ima”. This works fine.
When I use the condition “host labels” for a notification, this fails.
The notification is set to “Match host labels: mqtt:ima” is set to the notification as well.
No notification is sent - when I analyze the configuration for a notification event, CheckMK states: “This rule does not match: The host labels {‘mqtt’:‘ima’} did not match {}”
I’ve also tried with a blank installation from scratch (using docker) - same issue.
As I’m only allowed to post 1 screenshot per post, I’ll try to summarize what I’ve tested in addition:
my host has multiple custom tags (like: mqtt:ima , kafka:default, nodered:default ) . Using only one custom tag has the same issue
the notification is using a custom plugin (for threema). but as the condition for “firing” is not met, I assume this is not the issue (and it works when disabling the “Host label” check - but then I receive the notifications for all hosts, not only the ones I need and therefore are tagged )
when adding the condition to the rule, the tags are detected (by checkmk’s autocompletion when entering the first characters)
Error message stays the same: This rule does not match: The host labels {‘mqtt’:‘ima’} did not match {}”
I have also tried to set the condition either to the “host labels” and to “service labels”.
Hi @mbchris, how do you test your notification? Are you using the replay button in notifications view or are you generating fresh events?
@andreas-doehler, by the way, which version are you using? I thought labels in the notification environment (hostlabel_key=value) will be available only from version 2.x on?
@mbchris i checked also with RAW edition and there your are right the labels are missing in the context if you use RAW edition. I think the labels are not the only host macros missing.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact @fayepal if you think this should be re-opened.