[BUG] 2.0.0b6 RAW - Host Labels are missing from notification context

Hey all!

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 {}”

The tag is set on the host side.

I’m using 2.0.0b3 (CRE)

Thank you!

Try upgrading to 2.0.0b5 which is the latest and see if that fixes the problem.

Thanks for the reply.

Tried with 2.0.0b6 (latest version) and the problem still persists.

I tried with 2.0.0b6 and it works :wink:


This is a clean beta 6 installation. It is possible that an upgraded one shows other behavior.

EDIT: i will check with a self defined label

Thanks - different behaviour here :wink:

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”.

Here one example with own host label created.
It works also.


If you open the complete context you can see the labels as variables.

Resulting notifications, as booth labels existing all rules match.

The labels are not shown in the notification details:

To be on the safe side - we are talking about the same labels:

Setup > Host > host in a WATO subfolder > Edit Properties > Custom Attributes > Labels [x] > labelkey:labelvalue

They do not come through to the notification parameters. I’ve tested on 2.0.0b6 / b3 / 1.6.0p19

Used API and tried adding host + tag manually, same result for both.

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?

The complete thread is only about 2.0 :wink:

@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.

@andreas-doehler: sorry, i was too inattentive while reading :see_no_evil: