Nagios hostgroup_name排除项中的通配符
我很难在Nagios中find通配符和正则expression式的良好文档(特别是在排除条件下)。 这是我正在尝试做的一个例子: 在nagios.cfg ,设置了以下内容,据说可以启用*和? 作为通配符: use_regexp_matching=1 use_true_regexp_matching=0 在services.cfg ,我们有一个服务,我们想要适用于除了一些对象之外的所有对象; 那就是所有的Linux主机,而不是负载均衡器。 显式排除工作: define service { use generic-service service_description Puppet check hostgroup_name prod, staging, !prod-site_a-lbs check_command check_puppet_alive_nrpe } 但是,我们有许多站点,每个站点都有自己的主机组中的负载均衡器(因此可以通过站点轻松pipe理通知)。 而不是有一个很长的列表!prod-site_a-lbs , !staging-site_a-lbs , !prod-site_b-lbs 。 我希望能够将hostgroup_name行修改为: hostgroup_name prod, staging, !*-lbs 我已经尝试过了,尽pipe我们没有收到任何错误,但是此服务检查仍在应用于我们的负载平衡器。 为了仔细检查,我也尝试过: hostgroup_name prod, staging, !.*-lbs 但是,如预期的那样(因为没有设置use_true_regexp_matching ),这会失败,在运行checkconfig-noprecache : Error: Could not find any hostgroup matching '!.*lbs' […]