On Thu, Sep 05, 2013 at 03:36:59PM +0200, Michael Friedrich wrote:
> On 05.09.2013 14:33, Marc Haber wrote:
> > define serviceescalation {
> >          service_description             *
> >          hostgroup_name                  norm-notify
> >          contact_groups                  all-admins-mail
> >          first_notification              1
> >          last_notification               0
> >     notification_interval           120
> >     escalation_options              w,u,c,r
> >     escalation_period               24x7
> > }
> >
> > I would now like alarms generated by services in the service group ntp
> > to not use this escalation.
> >
> > I thus changed to:
> >
> > define serviceescalation {
> >          service_description             *
> >     servicegroup_name               !ntp
> >          hostgroup_name                  norm-notify
> >          contact_groups                  all-admins-mail
> >          first_notification              1
> >          last_notification               0
> >     notification_interval           120
> >     escalation_options              w,u,c,r
> >     escalation_period               24x7
> > }
> >
> >
> > define serviceescalation {
> >          service_description             *
> >     servicegroup_name               ntp
> >          hostgroup_name                  norm-notify
> >          contact_groups                  all-admins-mail
> >          first_notification              10
> >          last_notification               0
> >     notification_interval           120
> >     escalation_options              w,u,c,r
> >     escalation_period               24x7
> > }
> >
> > The line servicegroup_name !ntp is not accepted by icinga ("Error:
> > Could not expand servicegroups specified in service escalation").
> > Removing the ! fixed the syntax, but not my semantics.
> 
> afaik servicegroup exclusions on escalations are not 
> implemented/supported. patches/testcases welcome.

My destiny again ;-)

Here is my next try:

define serviceescalation {
        service_description             *,!ntp*
        servicegroup_name               *
        hostgroup_name                  norm-notify
        contact_groups                  all-admins-mail
        first_notification              1
        last_notification               0
        notification_interval           120
        escalation_options              w,u,c,r
        escalation_period               24x7
}
               
define serviceescalation {
        service_description             ntp*
        servicegroup_name               ntp
        hostgroup_name                  norm-notify
        contact_groups                  all-admins-mail
        first_notification              10
        last_notification               0
        notification_interval           120
        escalation_options              w,u,c,r
        escalation_period               24x7
}

With this, icinga complains:

Error: Could not find a service matching host name 'alwaysup' and
description 'ntp*' (config file '/etc/icinga/objects/mh-contacts.cfg',
starting on line 75)
Error: Could not expand services specified in service escalation
(config file '/etc/icinga/objects/mh-contacts.cfg', starting on line 75)
Error processing object config files!

line 76 the service_description ntp* service escalation.

My alwaysup host is:

define host {
        use             mh-host
        host_name       alwaysup
        hostgroups      alwaysup
        check_command   always-ok
}
        
define service {
        use             mh-service
        host_name       alwaysup
        servicegroups   alwaysup
        service_description always up
        check_command   always-ok
}

define service {
        use             mh-service
        host_name       alwaysup
        servicegroups   ntp
        service_description ntp always up
        check_command   always-ok
}

define command {
        command_name    always-ok
        command_line    /usr/lib/nagios/plugins/check_dummy 0 "always OK"
}

define servicegroup {
        servicegroup_name alwaysup
        alias             alwaysup
}

define hostgroup {
        hostgroup_name alwaysup
        alias           alwaysup
}

Why does my service service_descrption "ntp always up" not match ntp*,
making sure that the servicegroup is not empty?

Greetings
Marc

-- 
-----------------------------------------------------------------------------
Marc Haber         | "I don't trust Computers. They | Mailadresse im Header
Mannheim, Germany  |  lose things."    Winona Ryder | Fon: *49 621 31958061
Nordisch by Nature |  How to make an American Quilt | Fax: *49 621 31958062

------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58041391&iu=/4140/ostg.clktrk
_______________________________________________
icinga-users mailing list
icinga-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/icinga-users

Reply via email to