Possible bug? Unable to add more than one host label to a rule or predefined condition

Hi,

what you are seeing is actually intended behavior. A host cannot have two labels with the same key but different values, see https://checkmk.com/cms_labels.html. Since the host labels are combined via an AND-Operation when checking whether a given rule applies to a host (also see the link above), the rule you are trying to define would never match, since you use the same key (pn_sysinfo/operatingsystem) twice, but with different values.

What happens internally is that checkmk uses as dictionary (Python) to handle the labels. It uses the label keys as dictionary keys and overwrites one label with the other (since the keys are equal).

Best
Jörg

2 Likes