Another quick escalation question

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Another quick escalation question

Post 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?
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Another quick escalation question

Post 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 :)
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: Another quick escalation question

Post 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?
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Another quick escalation question

Post 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.
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: Another quick escalation question

Post 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?
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: Another quick escalation question

Post by BanditBBS »

It looks like the service_description wildcard only works if you use the host_name field and not the hostgroup field.....hmmmm
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Another quick escalation question

Post 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.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Another quick escalation question

Post 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.
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: Another quick escalation question

Post 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.
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: Another quick escalation question

Post 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).
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
Locked