Help configuring HostEscalation

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
mr_snelson
Posts: 3
Joined: Thu Jan 23, 2014 1:36 pm

Help configuring HostEscalation

Post by mr_snelson »

I'm trying to configure hostescalation and i'm having trouble understanding how to get notifications to go out at the right time. What I want is when a host goes down a notification is sent out by email and then it resends the notification even 1440 minutes. I've gotten this step done and working. But then I want a text notification to go out 15 minutes after the first email to escalate the outage. I've successfully gotten the email and text to go out but they send at the same time instead of 15 minutes after the email. Below is what I've put together, any assistance/Tips would be greatly appreciated.

define host{
name generic-printer
use generic-host
check_period 24x7
check_interval 5
retry_interval 1
max_check_attempts 10
check_command check-host-alive
notification_period workhours
notification_interval 1440
notification_options d,r
contact_groups admins
register 1
}

define hostescalation {
host_name HP425-2
hostgroup_name network-printers
contact_groups paging
first_notification 1
last_notification 1
notification_interval 15
}

Thank you in advance!
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Help configuring HostEscalation

Post by slansing »

This might not be the best use of escalations, what you should look at doing is setting up two different contacts, one for the email portion (every 24 hours) and the other for your SMS messaging, then you can define each contacts settings in their configuration individually.
mr_snelson
Posts: 3
Joined: Thu Jan 23, 2014 1:36 pm

Re: Help configuring HostEscalation

Post by mr_snelson »

I have set up two different contacts and two different contact groups. Where in the define host portion i have the contact group set to admins, which sends the email notification and then in the host escalation area i have the contact group paging which sends out the text. I am new to nagios so correct me if i'm wrong, but i figured i would have the host escalation potion que my contact group to send out the notification when needed. I just cant figure out how to get the notification send out at the right now.

Thanks
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Help configuring HostEscalation

Post by scottwilkerson »

the notification_interval is how frequently you are re-notified

you would need to set the notification_interval of the service to be 15, then set

Code: Select all

define hostescalation {
host_name HP425-2
hostgroup_name network-printers
contact_groups paging
first_notification 2
last_notification 2
}
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
mr_snelson
Posts: 3
Joined: Thu Jan 23, 2014 1:36 pm

Re: Help configuring HostEscalation

Post by mr_snelson »

From what I understand changing the Notification_interval to 15 would then have an email sent every 15 minutes. I want an email to be sent once a day, hence the 1440, and then i want an escalation text sent out 15 minutes after the email is reported down. We don't want tons of emails sent out over an over again.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Help configuring HostEscalation

Post by tmcdonald »

The section

Code: Select all

first_notification 2
last_notification 2
means that the first escalation notification will go out on the second regular notification, and the last one is also the second regular notification. Only one escalation notification will be sent out in this case.
Former Nagios employee
Locked