Multiple key in label vs host tag

Hi,

I came to the situation that labels and hostags are two same things with different names. I use both of them, to mark and separate things.

I have 10 satellites in corresponding wato/folder. Each folder have label satellite:<city name>. Example:

satellite:kosice
satellite:budapest
satellite:denver
satellite:vegas
...

Now, I want to make whatever rule which will apply for two satellites only, i.e. budapest and denver.
I can’t do it with hosttags, because under conditions one hosttag can be used only once.
And I can’t do it with labels, becase there occurs message Only one value per KEY can be used at a time.satellite:xxx is already used so in this case labels and hosttags are usable only once.
Workaround is to make same rules in every needed wato folder. I thought this will be the perfect case for labels, but it isn’t. Or maybe I’m missing something obvious.

If your hosts are already sorted in WATO folders based on the location, I would solve it like this:

  • In the WATO folders for budapest and denver, go to the the folder properties and set another label, e.g. budapest_or_denver:true
  • Use this as a label condition for your rule.

A more generalized approach would be to use the ruleset “Host labels”. Here you can set a label based on an host tag. Create two rules, both setting the label budapest_or_denver:true. The first one matches on the host tag “Satellite” = “Budapest”, the second one on “Satellite” = “Denver”.

No that’s how it works I’m afraid. I was almost sure there where a feature request for this at https://features.checkmk.com but can’t find it.

We use labels in the same way, for example hardware model (Lets assume “HP” and “Dell” - Some times we might want to have a view of both HP and Dell servers, that can’t be done today unless we use pre-defined conditions.

Thats not entirely true, a label does not have to be predefined, it can be anything. Let’s say your add a new satellite and you add hosts to that location using automation, you can set your label on the host it selves and do not have to (pre)create it.

I think you’re looking for the top voted request :slight_smile:

give it more votes :smiley: maybe we can still get it into the 2.1? :partying_face:

1 Like

I’m not as that feature request does not explicitly talk about that, and Tribe even confined that. We would most likely need another feature request.

Hi Anders,
yup, noticed that as well and created the request for rules, I guess my comment in the “filters” feature request wasn’t approved yesterday when you checked :confused:
here’s the rule feature request

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.