Labels in conditions: (when) can we "or" them?

Continuing the discussion from Possible bug? Unable to add more than one host label to a rule or predefined condition:

Say I have a bunch of hosts in three categories: blue, red, and purple and I want categorize them with labels like so:


Currently it is not possible to define a rule which applies to both blue and red hosts because only one value per key is allowed as a condition and one overwrites the other. In the above mentioned thread this is explained as intended behaviour. But it differs from hosttags where I can use is one of to declare multiple colors.

As it is, the “value” part of labels is quite useless because I cannot even express “color:blue” AND “color:red” but must ressort to “is_blue:yes” AND “is_red:yes”

Will this be changed? In 1.6? I’m on 1.6.0p18 CEE and would really appreciate the is one of and is none of operators for labels as well.


I, likewise, turn things upside down and use things like is_red:yes, etc.

For me, because there are many labels, I resort to a type_attribute style boolean. So for me, I’d prefer:

color_red: yes
color_blue: yes
color_purple: yes

Likely the implementation is not really sophisticated and is just a string matcher.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.