Recovery notifications with escalations.

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
User avatar
mgaribaldi
Posts: 26
Joined: Thu Nov 06, 2014 1:58 pm

Recovery notifications with escalations.

Post by mgaribaldi »

Hello everyone,

I wanted to see if anyone has found a resolution to have recovery notifications sent to members who were previously contacted in an escalation policy/chain.

From what I'm reading here, http://nagios.sourceforge.net/docs/3_0/escalations.html, at the tail of the Recovery Notifications section, the escalation code should be smart enough to send the email to the previous group of recipients.

My scenario:

hostescalation policy #1:
For notifications 1-3 I want to generate an email to myself.

hostescalation policy #2:
For notifications 4-forever I want to send to local root (I want only three notifications to be sent and halt thereafter which is why I'm email to a local user account -- Is there a better way??)

Results:
I receive email notifications up to three and then they stop (expected). Looking at the logs, I see after three the notifications are then sent to root (expected).

But when a recover occurs after the three notifications, the recovery notification is not sent to my email and sent only to the local root. Is there a way to make sure the recovery also gets sent to my email?

I can post my configurations if necessary. Any help would be greatly appreciated. Thank you.

Michael (my first post)
"We all float down here...."
-Pennywise
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Recovery notifications with escalations.

Post by tmcdonald »

Might help to see your configs since those will tell us exactly what is going on.
Former Nagios employee
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Recovery notifications with escalations.

Post by slansing »

Yeah, I believe that recovery notifications are just sent to the group currently associated with notifications, in this case, that would be the escalation level that was last active at the time of recovery. You could set up an additional level, that only allows recovery alerts, and re-assign the other contacts to it. I'd honestly need to test that out to be totally sure. By the way, I found Waldo!
User avatar
mgaribaldi
Posts: 26
Joined: Thu Nov 06, 2014 1:58 pm

Re: Recovery notifications with escalations.

Post by mgaribaldi »

Thank you for the responses. I believe creating another contact group that receives only recoveries and include this group in the second escalation will do the trick! I will try that and get back.

define hostescalation{
host_name host1
contact_groups me_group
first_notification 1
last_notification 3
notification_interval 30
}

define hostescalation{
host_name host1
contact_groups root_group
first_notification 4
last_notification 0
notification_interval 30
}
"We all float down here...."
-Pennywise
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Recovery notifications with escalations.

Post by slansing »

Great! Let the team know how that works out for you. :)
User avatar
mgaribaldi
Posts: 26
Joined: Thu Nov 06, 2014 1:58 pm

Re: Recovery notifications with escalations.

Post by mgaribaldi »

Circling back...haven't had a chance to test this yet. I will follow up.
"We all float down here...."
-Pennywise
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Recovery notifications with escalations.

Post by slansing »

Sounds good OP!
User avatar
mgaribaldi
Posts: 26
Joined: Thu Nov 06, 2014 1:58 pm

Re: Recovery notifications with escalations.

Post by mgaribaldi »

This worked great. By creating a separate group that receives only UP and RECOVERY alerts and adding them to final escalation works! Overlapping the escalation policies might be something to consider by one.

define hostescalation{
host_name host1
contact_groups me_group
first_notification 1
last_notification 4
notification_interval 30
}

define hostescalation{
host_name host1
contact_groups recovery_group
first_notification 3
last_notification 0
notification_interval 30
}

***where contacts inside recovery_group only have the "r" and "u" flags assigned to both service/host_notification_options.

Edit: Waldo has been found, therefore....Locked.
"We all float down here...."
-Pennywise
Locked