Page 1 of 2

More fun with escalations

Posted: Tue Aug 20, 2013 12:54 pm
by jsharris
I need to set up host and service escalations for every host and service that we are currently monitoring. Not all hosts have identical services. I need two escalations, one that goes to a ticketing system (critical only, first only) and one that goes to IT staff (all states, all notices). Starting with the service escalation I create one escalation for the IT staff with every host and service added to their respective sections. However, when trying to apply the configuration it failed. From what I have gathered in research so far it appears the only way to effectively do this is to use the escalation wizard which would result in something like 1,700 configuration objects (host: 166 for ticketing, 166 for IT; service: 687 for ticketing, 687 for IT).

Is it not possible to create escalations based around the criteria for the escalation as opposed to what is being monitored? Ideally we would have two host escalations (ticket & IT) covering all hosts and two service escalations (ticket & IT) covering all services with each escalation configured for what states are triggered and what contacts/contact groups get notified and when.

Anyone else run into a similar situation?

Re: More fun with escalations

Posted: Tue Aug 20, 2013 12:57 pm
by abrist
The escalations still need to be associated with objects. What error were you receiving from the "apply configuration" process?

Re: More fun with escalations

Posted: Tue Aug 20, 2013 1:16 pm
by jsharris
I understand the escalations have to be associated with objects. I am trying to associate the escalation with all of the objects instead of creating a separate escalation for each and every object which sounds like an administrative nightmare.

When I apply the configuration from the escalation configuration screen all it tells me is "An error occurred while attempting to apply your configuration to Nagios Core. Monitoring engine configuration files have been rolled back to their last known good checkpoint."

If I use Tools->Write config files, the write operation completes. When I Verify the output leads with the following (full output is attached):
Error: Could not find a service matching host name '2550-pod1-01' and description '/ Disk Usage' (config file '/usr/local/nagios/etc/serviceescalations.cfg', starting on line 14)
Error: Could not expand services specified in service escalation (config file '/usr/local/nagios/etc/serviceescalations.cfg', starting on line 14)

I have read in several places that if using a wildcard the escalation will not work unless all of the services selected exist on all of the hosts selected but I am not using a wildcard.

Re: More fun with escalations

Posted: Tue Aug 20, 2013 1:23 pm
by abrist
hmm. Could you post or pm the contents of the file:

Code: Select all

/usr/local/nagios/etc/serviceescalations.cfg

Re: More fun with escalations

Posted: Tue Aug 20, 2013 1:52 pm
by jsharris
Didn't take the first time. Had to change from .cfg to .txt.

Re: More fun with escalations

Posted: Wed Aug 21, 2013 9:44 am
by BanditBBS
Wow, umm, yeah, that's going to cause you all kinds of errors, unless all those services exist on all of the hosts.

I'd use a static configuration file and use wildcards.

Code: Select all

define serviceescalation {
	host_name                                 *
	service_description           		*
	first_notification            		1
	last_notification             		0
	notification_interval         		60
	escalation_period             		xi_timeperiod_24x7
	escalation_options            		w,c,r,
	}	
Especially if like you said, you want this for every service. I think that'll work. You of course would need to add a contact or contract_group setting as well.

Re: More fun with escalations

Posted: Wed Aug 21, 2013 10:45 pm
by scottwilkerson
BanditBBS wrote:Wow, umm, yeah, that's going to cause you all kinds of errors, unless all those services exist on all of the hosts.

I'd use a static configuration file and use wildcards.

Code: Select all

define serviceescalation {
	host_name                                 *
	service_description           		*
	first_notification            		1
	last_notification             		0
	notification_interval         		60
	escalation_period             		xi_timeperiod_24x7
	escalation_options            		w,c,r,
	}	
Actually you cannot do this unless every host has every service. Fore example if you have ONE host that doesn't have a Ping service, but all the rest do, this will error.

Re: More fun with escalations

Posted: Thu Aug 22, 2013 7:12 am
by jsharris
Scott,

That being the case then there is no way to create a blanket escalation and the only option is to use the escalation wizard to create the hundreds and hundreds of objects? I might be able to get the project parameters changed so that only one notification needs to go out and I can control which the ticketing system gets at the contact level but then that still leaves me unable to mass change the notifications options as the bulk modification tool does not support changing that setting.

So I either create a massive number of new objects and make sure more are created each time a new system is added or I manually change each object's notification settings?

Re: More fun with escalations

Posted: Thu Aug 22, 2013 7:50 am
by scottwilkerson
Actually, I am going to step back and say I was wrong, just tested BanditBBS's object and it worked just fine..

I must have been confusing myself with the previous scenario...

Re: More fun with escalations

Posted: Thu Aug 22, 2013 8:09 am
by jsharris
I'll give it a try!

BanditBBS, how do I create a static config file? The content you provided matches what shows up in my config file when I configure it through the GUI but it doesn't verify. How do I bypass that and force it?