Page 1 of 1

Escalation based on service-group [solved]

Posted: Tue Jan 29, 2013 7:26 am
by dgsullivan01
What I'm trying to do:
Use escalations based on servicegroups.

What Nagios does instead:
Uses the 'admins' contact_group defined in the 'generic-service' template.

Escalation Template:

Code: Select all

define serviceescalation {
        name                          service-escalation-1st-PROD
        first_notification            2
        last_notification             5
        notification_interval         10
        escalation_period             24x7
        escalation_options            c
        register                      0
        }
Service Escalation:

Code: Select all

define serviceescalation {
        use                         service-escalation-1st-PROD
        servicegroup_name           linux-services-prod
        contact_groups              unix-primary
}
Service Definition:

Code: Select all

define service {
        service_description             check_centos_total_procs
        use                             active-service
        host_name                       !server1,!server3
        hostgroup_name                  linux-prod
        check_command                   check_nrpe!check_centos_total_procs
        notifications_enabled           0
        servicegroups                   linux-services-prod
        }

Thanks for any help!

Re: Escalation based on service-group

Posted: Tue Jan 29, 2013 11:07 am
by gshergill
Hi dgsullivan01,

You mention the following:

Code: Select all

define service {
        service_description             check_centos_total_procs
        use                             active-service
Just to confirm, have you defined a contact_group in the template "active-service"?

Might be worth checking because there could be a conflict there.

Kind Regards,

gshergill

Re: Escalation based on service-group

Posted: Tue Jan 29, 2013 11:56 am
by slansing
Good eye gshergill, yes lets make sure that the escalation is defined there, otherwise the service will revert to defaults.

Re: Escalation based on service-group

Posted: Thu Jan 31, 2013 8:26 am
by dgsullivan01
So I'm not sure where along the way I made an error, but I believe I incorrectly defined the servicegroups in the escalations. Chaining templates and definitions can become very confusing ;)

define servicegroup with 'servicegroup_name' -> define service with 'servicegroup' -> define serviceescalation using 'servicegroup_name'

To escalation multiple servicegroups you could define more than one in the servicegroup definition with 'servicegroup_members' or in the escalation by listing more than one under servicegroup 'servicegroup_name'.

Mix that in with the escalation, service, and all my other templates I have and you could confuse almost anyone.

Re: Escalation based on service-group

Posted: Thu Jan 31, 2013 10:26 am
by slansing
It can get confusing, but it's good to have multiple channels which allows a lot more customization, it's difficult to do via text config's but that's Core :) Have you resolved this issue? I just saw some statements in your last post.

Re: Escalation based on service-group

Posted: Thu Jan 31, 2013 2:42 pm
by dgsullivan01
Yes. Notifications through escalations groups with service groups are work properly now.

Thanks.