Hello Michi,

That sort of requires a more complex expression. While you could use the “in” 
operator this would just work for exact string matches. The better approach is 
to write your own global function which provides such a functionality.
A similar example with templates can be found here: 

globals.check_matching_hostgroup = function(host, search) {
   for (hg in host.groups) {
     if (match(search, hg)) {
       return true

   return false

apply Service “blub” {
   assign where check_matching_hostgroup(host, “*_customer")
Thank you very much, that will work perfectly for me!

Kind regards
icinga-users mailing list

Reply via email to