CMK version: 2.1.0p14.cee OS version: virt1, 1.5.4
I am currently setting up a distributed monitoring environment. At the moment, I have a “remote” site with the bulk of monitored hosts, and a “central” site for configuration and interactive work.
I would like to have the agents pull their updates from their corresponding site, i.e. at the moment from the remote site - which technically works as intended using a rule " Agent updater (Linux, Windows, Solaris)". I’d like to apply this rule only to hosts on the remote site, so I added as condition a match on the label “cmk/site:remote”. This does not work, the rule is not applied to the hosts on the remote site. When I add the condition “cmk/site:central” instead, the rule is applied to all hosts on the remote site. Why??? All the hosts are definitely labeled “cmk/site:remote” automatically.
Is this a bug, or has label matching in distributed environments a twist I don’t get?
I can confirm your problem regarding this issue. Looks like, that internal labels like “cmk/site:mysite” can not use in rulesets. The question is, is there a documented limitation about this? Is there someone at tribe who can clarify this?
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:
You need a host that has a label “cmk/site:XYZ” (all host should have one of those)
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.
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