Support AND/OR/NOT for labels in rules
was: Support Regex for Labels in Rules
https://features.checkmk.com/suggestions/293832/support-and-or-and-not-for-labels-in-filters and https://features.checkmk.com/suggestions/310195/regex-for-host-labels-in-filters already show people like to use labels.
However, once one starts to use them extensively in filters, and hence labels become more and more a primary selector of hosts/services for users, the next step will be to want to apply rules based on label key/values and their regex.
I guess " regex for key + value" might be more expensive when it comes to computing applicable rules, so I would be happy with only the value being regex capable.
This should also apply for filtering with tags.
Generally there should be a general way that allows putting together conditions of different type (labels, tags, hostnames, ....).
Maybe a simple query language would help here, like e.g. it exists in Jira (https://support.atlassian.com/jira-service-management-cloud/docs/use-advanced-search-with-jira-query-language-jql/)
This should be available everywhere where you do some kind of filtering:
- filter in UI
I fully agree - for me it would be an half/incomplete implemented feature if its not possible to use it in rules. Not want to being overly pessimistic, but this one is not getting enough attention I think to be even considered. And while the main Feature is marked as planned, nothing happend here so far :(
Now when Support AND, OR and NOT for labels in filters have been implemented I'd like this request, based on the options in the filer selection for labels to be created for rules as well.
We are moving away from ALL regex, WATO, hostnames, services selection in rules as we have over 2000 rules today. We will enforce the usage of service labels and host labels and as such both service labels and host labels would need to have AND/OR/NOT conditions in rules.
Thomas Lippert Admin
The current implementation allows "AND" and "AND NOT" but no groups or "OR" (see screenshot).
If this gets replaced by the same AND/OR/NOT feature with groups, like in the filters, would this address this need? It will not have Regex as initially requested
The OR operator implemented within rules like with filters would be very helpful to us and would keep things consistent across the UI. Thank you,
Thomas Lippert Admin
Planned for Checkmk 2.3 - We will implement a similar functionality as we have implemented for the search for labels in filter to have a consistent functionality.
Therefore, I changed the headline of this request