Can regular expressions be used in the WATO notification rules' host lists?


I am trying to configure meaningful notifications based on hostnames (through WATO). However I am not sure, if the hostname fields in “Match only the following hosts” and “Exclude the following hosts” only accept full host names or also placeholders (“pc-", “pc-???”) or even full regular expressions ("pc-.”, “pc-…”). I was not able to find this information in the manual. Please don’t hesitate to refer me to RTFM, should I have overlooked it :slight_smile:

We are currently using the 1.6.0 enterprise edition.


The hostname field cannot be a regular expression or a name with placeholders.
This must be a valid hostname.
For such groups of hosts i would use the host tags / labels or hostgroups.

1 Like

Also you might want to use the inline help, which can provide useful information on a certain configuration item.


I already have, but the inline help doesn’t mention it:

However this could also have been an omission in the documentation, as placeholders and/or regexes are supported in so many other locations in check_mk

I can’t use hostgroups in the concrete case, as there is only a “Match Host Groups” but no “Exclude Host Groups” (unfortunately, that would be very handy to have…:slight_smile: ).

We currently don’t actively use tags. I’ll have to check how to use them and how to assign tags to servers. Thanks for the hint

I am confident you will find a solution using the input from @andreas-doehler.
However, I am discussing your input on clarifying how to use that field internally.

indeed :-). Thanks a lot