Werk #17915: Fix broken central site label matching
| Component | User interface | ||||||
| Title | Fix broken central site label matching | ||||||
| Date | Apr 8, 2025 | ||||||
| Level | Trivial Change | ||||||
| Class | Bug Fix | ||||||
| Compatibility | Incompatible - Manual interaction might be required | ||||||
| Checkmk versions & editions | 
 | 
Previously, agent rules that defined the "cmk/site" host label as a
matching condition matched:
- All hosts if the condition was cmk/site:{current_site}where{current_site}is the name of the site you are currently accessing.
- No hosts if you specified any other cmk/sitevalue
With this werk, we fixed an underlying bug where in the rule matching,
all hosts were assigned the cmk/site:{current_site} label regardless
of what site the host is being monitored on.
Hosts now properly report the site they're being monitored on as the
cmk/site label value.
Note: Werk #17335 already attempted to address this problem but was ineffective.
Attention, incompatible change:
This changes which hosts are affected by agent rules matching on the
cmk/site label. If you have any agent rules matching on the cmk/site
host label, your agent bakery is affected:
Any agent rules matching on the cmk/site host label of the
current site now no longer match hosts of ALL sites, only on hosts
of the current site.
Any agent rules matching on the cmk/site host label of
other sites now no longer match on hosts of the current site, only
on hosts of that other site.
Example: If you are logged into your central site "central" and bake
agents with an agent rule that applies to hosts with label
cmk/site:remote, the rule would never have been active before this
werk.