TL;DR: How can I use a parameter in a regex?
$param$\d.example.com does not work. Adding 1 or 2 backslashes does not work either
I need to set up a BI Aggregation for some clustered services. The setup looks like this:
Three-ish servers, which have numbered hostnames
email1.example.com email2.example.com email3.example.com
and a Loadbalancer with the same name, but no number.
We use this naming-schema for multiple services (LDAP, WEB, …) and I wanted to create rules with parameters. The aggregation is a very flat tree:
Service $service="email"$ is available (Worst status of all children) |--> Loadbalancer $service="email"$ (Worst) |--> Cluster nodes $service="email"$\d (Worst, but limited to WARNING)
So I tried to set up a rule and set the
Child Node Generator to
Create Nodes based on a host search to capture the numbered cluster-hosts but it wants a regex, which seems to be incompatible with
$parameters$ due to the dollar sign.
Is that correct or is there a trick to use parameters in regexes?
I was unable to find any reference and surfing the cmk code is too hard for me.
edit: add screenshot