Using host/service labels, is there a way to search/view all labels assigned to hosts/services/rules?

Trying to streamline my CMK configuration and move away from always specifying explicit hosts/services in rules. Using host/service labels seems like an easier way to control what rules get assigned to what hosts/services.

The issue I am having is, if I have a label - how can I quickly find out what hosts/services and rules are associated with a specific label?

I tried using the “Service monitoring rules” screen and using the search function within this screen, but the full text search does not find labels.

Is there a better way to do this?

Hi,
hosts and their labels can be found in Monitor > All hosts > Filter:


You can add a host label column to your host list: Display > Customize view > Add column.

Services and their labels can be found in Monitor > Service search > Filter:


You can add host and service labels to this view: Display > Customize view > Add column > Host labels and/or Service labels.

The rule search (Setup > Rule search > Rules > Refine search) doesn’t support searching for labels. You can setup predefined conditions for labels and search for them:

Karl

1 Like

Thanks, I can now see how this works for hosts/services.

Predefined conditions would be sort of another layer on top of using host/service labels.

Right now I assign rules to labels, then use host monitoring rules > host labels to assign labels to hosts.

This ties the rules to the host.

I guess one could use predefined condition for the rules, then tie the condition to the host label. Interesting, always so many different ways to create magic in CMK! :slight_smile:

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.