Page 1 of 1

Host and Service Escalations Advice

Posted: Thu Mar 27, 2014 6:44 am
by FTL
Hi.

I don't even know if I'm using host/service escalations the way they are intended but they work for me the way I've set them up.

Problem is is it gets rather cumbersome having to enter 5 hosts escalations and 5 service escalations for every host i monitor.

The way i have them set up is thus:

Maximum of 5 Email alerts (service and or host) and then no more until the recovery email for any given host/service.
1 SMS alert and its the first notification with the email. Then no more SMS until the recovery text.

So this is how i went about setting them up a few years back when i first set Nagios up

Code: Select all

define hostescalation{
	host_name		HOST
	first_notification  	1
	last_notification	 4
	notification_interval	 3
	contact_groups 		servers email
	escalation_options	d,r
	}

define hostescalation{
	host_name		HOST
	first_notification	5
	last_notification	0
	notification_interval 0
	contact_groups 		servers email
	escalation_options	d,r
	}

define hostescalation{
	host_name		HOST
	first_notification	1
	last_notification 	1
	notification_interval	3
	contact_groups		servers sms
	escalation_option s	d
	}

define hostescalation{
	host_name		HOST
	first_notification	1
	last_notification	 4
	notification_interval	3
	contact_groups		servers sms
	escalation_options 	r
	}

define hostescalation{
	host_name 		HOST
	first_notification 	5
	last_notification 	0
	notification_interval	0
	contact_groups		servers sms
	escalation_options 	r
	}


define serviceescalation{
	host_name		SERVICE
	service_description 	*
	first_notification	 1
	last_notification	 4
	notification_interval 	3
	contact_groups		servers email
	escalation_options	c,r
	}

define serviceescalation{
	host_name		SERVICE
	service_description	*
	first_notification 	5
	last_notification	0
	notification_interval	0
	contact_groups		servers email
	escalation_options	 c,r
	}

define serviceescalation{
	host_name		SERVICE
	service_description 	*
	first_notification	 1
	last_notification	1
	notification_interval	3
	contact_groups		servers sms
	escalation_options	c
	}

define serviceescalation{
	host_name		SERVICE
	service_description	*
	first_notification	1
	last_notification 	4
	notification_interval	3
	contact_groups		servers sms
	escalation_options	 r
	}

define serviceescalation{
	host_name		SERVICE
	service_description	*
	first_notification	5
	last_notification	0
	notification_interval	0
	contact_groups		servers sms
	escalation_options	r
	}

However as im sure you can now see; when im adding in numerous hosts/services its gets rather tiresome having to copy and paste and edit 10 entries for each one.

Anybody suggest any way of streamlining these? Can they be templated or anything?

Thankyou

Re: Host and Service Escalations Advice

Posted: Thu Mar 27, 2014 3:57 pm
by tmcdonald
If you have that same host and service escalation being applied to multiple hosts/services, you can just add the names in a comma-separated list to the host_name fields.

Re: Host and Service Escalations Advice

Posted: Fri Apr 04, 2014 9:49 am
by FTL
Thankyou TM - sometimes the simplest of solutions get overlooked as you make yourself believe it cant be that simple!

Makes my config editing so much quicker now. Just wish the bigwigs here would hurry up and approve my request for funds for XI. :)

Re: Host and Service Escalations Advice

Posted: Fri Apr 04, 2014 10:11 am
by tmcdonald
FTL wrote:Thankyou TM - sometimes the simplest of solutions get overlooked as you make yourself believe it cant be that simple!)
Whatever gets the job done, right? I'll go ahead and close this now. Good luck with the XI appropriation!