Wildcards in service escalations query

Paul M. Dubuc work at paul.dubuc.org
Tue Jul 5 22:38:17 CEST 2011


Mohit Chawla wrote:
> Hi,
>
> On Tue, Jul 5, 2011 at 11:55 PM, Paul M. Dubuc<work at paul.dubuc.org>  wrote:
>> As long as any hosts that match the host_name directive have no services
>> defined, you will get this error.  The escalation apparently wants to have
>> host/service pairs.  It's a service escalation and all services must be
>> assigned to a host.  It doesn't automatically discard hosts that have no
>> services.
>
> But as you can see in the above config I posted, I am explicitly
> excluding those hosts which do not have any services associated with
> them ( foo.com and bar.com ). Hence, the config should be valid.
> Unless ofcourse: host_name *. !host1, !host2 is not the right way to
> include all hosts except host1 and host2 or some other bad logic.

It could be that the exclusion (!) doesn't work when combined with the * 
wildcard in that way.  It's equivalent to "host1, host2, ... hostN, !host1, 
!host2".  Try putting the wildcard at the end of the list and see if that 
works.  Also, make sure that the hosts you exclude are really the only ones 
that have no services.  Nagios will put warnings in the log file about hosts 
with no services assigned after it is restarted.  You can look there for any 
you might have missed.

Paul Dubuc

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list