Page 1 of 2

Another quick escalation question

Posted: Fri Apr 26, 2013 8:07 am
by BanditBBS
Looking here: http://nagios.sourceforge.net/docs/3_0/ ... escalation

If I create a service escalation like this:

Code: Select all

define serviceescalation{
        hostgroup_name  network_oncall
        contact_groups  network_oncall_pri
        first_notification   1
        last_notification   0
        notification_interval   15
        }
Will that do all services associated with all hosts in that hostgroup, or do I have to put in a service and/or service group as well?

Re: Another quick escalation question

Posted: Fri Apr 26, 2013 9:17 am
by slansing
In my understanding you need to define both as they are handled separately within Nagios:

http://assets.nagios.com/downloads/nagi ... ations.pdf

There is also a wizard available for escalations under CCM > Tools > Escalation Wizard, if that helps :)

Re: Another quick escalation question

Posted: Fri Apr 26, 2013 9:38 am
by BanditBBS
slansing wrote:In my understanding you need to define both as they are handled separately within Nagios:

http://assets.nagios.com/downloads/nagi ... ations.pdf

There is also a wizard available for escalations under CCM > Tools > Escalation Wizard, if that helps :)
Yes, you have to create both. I know that. I have host escalations created and they are working fine. I am just concerned with service escalations right now and refer back to my opening post question.

I can not use the wizard, I have to create this in a static config due to on-call rotation handling.

can anyone answer my original question? In the service esclation, if I define a hostgroup and not any specific service, will the service escalation be tied to all services under the hosts in that hostgroup?

Re: Another quick escalation question

Posted: Fri Apr 26, 2013 10:19 am
by slansing
Yes I most certainly can.. You can define hostgroups in your service escalation and in doing so it will create a definition for the service you list under the service_description section of your configuration, under all of the hosts in the group.

Following this rule you must declare a service name, or the escalation will fail. And of course all of the hosts/hostgroups must have that service within them.

Re: Another quick escalation question

Posted: Fri Apr 26, 2013 10:22 am
by BanditBBS
slansing wrote:Yes I most certainly can.. You can define hostgroups in your service escalation and in doing so it will create a definition for the service you list under the service_description section of your configuration, under all of the hosts in the group.

Following this rule you must declare a service name, or the escalation will fail. And of course all of the hosts/hostgroups must have that service within them.
I found this URL: http://nagios.sourceforge.net/docs/3_0/ ... escalation

it mentions I can use a wildcard in the service_description. When I try that, it fails. Any hints?

Re: Another quick escalation question

Posted: Fri Apr 26, 2013 10:33 am
by BanditBBS
It looks like the service_description wildcard only works if you use the host_name field and not the hostgroup field.....hmmmm

Re: Another quick escalation question

Posted: Fri Apr 26, 2013 10:37 am
by slansing
I recall that Mike G was working on trying to get this sorted out sometime during the last incremental release, I'm not sure how far he got though. I believe the wildcard was only working with hosts rather than services, I'll do some digging and we will get back to you on this.

Re: Another quick escalation question

Posted: Fri Apr 26, 2013 11:19 am
by slansing
Quick update since I'm hoping you are tracking this thread. Using wildcards in escalations will not work, because of the rule that the service's must be present in the host's/hostgroup's defined in the configuration, if one of the services is not, it will break.

Re: Another quick escalation question

Posted: Fri Apr 26, 2013 11:24 am
by BanditBBS
I figured it out. I added a dummy service to all the hosts in the hostgroup I wanted to use. Some of the hosts had no services and that was making the wildcard error out. Would be nice if it worked without that issue though.

Re: Another quick escalation question

Posted: Fri Apr 26, 2013 11:46 am
by BanditBBS
slansing wrote:Quick update since I'm hoping you are tracking this thread. Using wildcards in escalations will not work, because of the rule that the service's must be present in the host's/hostgroup's defined in the configuration, if one of the services is not, it will break.
I consider that a bug, not a rule :) That just means if someone wants to use a wildcard, they either have to add a dummy service to all hosts or not use the hostgroup_name directive in the serviceescalation. I would think Nagios would check and then just skip that host. Would be much more intuitive that way(imo).