Matching labels in Agent Updater rule

Hi,

we are currenlty running into the same issue.
We want do apply rules to all host, which are monitored on a specific Site.
The monitoring site is set explicit for each host and not by folder.

Therefor we want to use the automatically assigned label cmk/site:XYZ as condition in agent rules e.g. “Agent updater (Linux, Windows, Solaris)”. We can select the label as Condition, but the condition does not match, even if the host has the chosen label.

To reproduce the issue follow these step:

  1. You need a host that has a label “cmk/site:XYZ” (all host should have one of those)
  2. Created a Agent updater Rule which shall be used if a host does match this label - this rule will not get applied on the chosen host, but it should be.
  3. For comparison, change the condition of the rule, to be applied, if the host does not have the label assigned - in this case the rule does match but should not match

@robin.gierse can you look into this again?