On Mon, Oct 11, 2010 at 4:02 PM, Paul M. Dubuc <w...@paul.dubuc.org> wrote: > Terry wrote: >> >> On Mon, Oct 11, 2010 at 3:48 AM, >> <michal.lacko...@cz.schneider-electric.com> wrote: >>> >>> Hi All, >>> >>> Is there any way how to create service escalation in the following way: >>> >>> hostgroup_name Group1,Group2 >>> service_description * >>> contact_group Managers >>> >>> Basically I would need to escalate all service problems on the hosts >>> which >>> are members of Group1 and Group2 to the managers. >>> >>> thanks in advance >>> Michal >>> >>> >>> ------------------------------------------------------------------------------ >> >> Yes, you're exactly right. We took it a step further and put all >> hosts in a single group then globbed it as you did above: >> >> define serviceescalation{ >> hostgroup_name allhosts >> service_description .* >> contacts foo,foo2 >> first_notification 1 >> last_notification 1 >> notification_interval 1 >> escalation_options w,u,c >> } >> define hostgroup { >> hostgroup_name allhosts >> alias allhosts >> members .* >> } >> use_regexp_matching=1 >> >> I think that's all you need to enable globbing. > > Thanks for this example. > > I'm trying to do something similar with an allhosts hostgroup definition and > it doesn't seem to work unless all hosts in the allhosts group also have > services defined for them. In this case I get an error like > > Error: Could not find a service matching host name 'AXSP51' and description > '.*' (config file > '/vol/omni/nagios-3.2.1/config/test/objects/contacts/Contacts.cfg', starting > on line 74) > Error: Could not expand services specified in service escalation (config > file '/vol/omni/nagios-3.2.1/config/test/objects/contacts/Contacts.cfg', > starting on line 74) > > AXSP51 has no services defined for it, but I monitor it as a parent for > hosts that do. Do I need to maintain a host group to use instead of > allhosts just for the hosts that have services defined for them, or is there > a more convenient (i.e., less error prone) way around this? > > Thanks, > Paul Dubuc > >
I just created a passive check to get around this if I remember correctly: define service{ hostgroup_name allhosts service_description trap servicegroups trap is_volatile 1 flap_detection_enabled 0 active_checks_enabled 0 passive_checks_enabled 1 max_check_attempts 1 check_period 24x7 check_command check_none } ------------------------------------------------------------------------------ Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. Spend less time writing and rewriting code and more time creating great experiences on the web. Be a part of the beta today. http://p.sf.net/sfu/beautyoftheweb _______________________________________________ Nagios-users mailing list Nagios-users@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