Skip to content

Add support for grouping hosts based on host labels - #1175

Draft
robin-checkmk wants to merge 1 commit into
develfrom
feature/inventory-labels
Draft

Add support for grouping hosts based on host labels#1175
robin-checkmk wants to merge 1 commit into
develfrom
feature/inventory-labels

Conversation

@robin-checkmk

Copy link
Copy Markdown
Member

Pull request type

Try to limit your pull request to one type, submit multiple pull requests if needed.

Check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no API changes)
  • Build related changes
  • Documentation content changes
  • Other (describe what kind of change you performed):

What is the current behavior?

Describe the current behavior that you are modifying, or link to a relevant issue.

Host labels can neither be read as a variable, nor be used as a group source.

What is the new behavior?

Describe the behavior or changes that are being added by this PR.

  • Add labels as a source for groupsources which creates one group per host label, named label_<key>_<value>. Characters that are not valid in a group name are replaced by underscores.
  • The labels of a host are now available as the host variable checkmk_labels, whether or not labels is listed in `groupsources``. The effective labels are read from the monitoring core, so they include the labels Checkmk assigns through label rules and service discovery and not only the ones configured in Setup.

Other information

Any other information that is important to this PR, e.g screenshots of how the component looks before and after the change.

@robin-checkmk robin-checkmk self-assigned this Aug 25, 2026
@github-actions github-actions Bot added documentation Improvements or additions to documentation inventory labels Aug 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation inventory

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant