Rule for label creation based on service name

I just tried this in a 1.6.0p17 Enterprise setup, works for me.

WATO → Host & Service Parameters → Monitoring Configuration → [Service Checks] Service labels

“[Conditions] Services”: .*/var$
(starting with any character any count. then literal “/”, “v”, “a”, “r”, then end of string)

This should match services like “Filesystem /var” and “Mount options of /var” but not “… /var/log”

The ruleset overview shows the condistions for this rule as “Service name is .*/var” (yes, including the regexp special characters dot and asterisk in the beginning, but not the trailing dollar sign)
And when I activate my changes, I get my “test:true” label added to the matching services as expected and to no other service.

2 Likes