Page 3 of 3

Re: email alert for Service Escalation not working

Posted: Wed Apr 29, 2015 10:47 am
by tmcdonald
bosecorp wrote:the second escalation should have been triggered 3 minutes after the first escalation, right
Nope. It would be 1 hour, since the first escalation has an interval of 30 and the second escalation doesn't pick up until the third notification. Should look something like this:

Code: Select all

1:00 - OK
1:05 - OK
1:10 - CRITICAL 1, SOFT state
1:11 - CRITICAL 2, SOFT state
1:12 - CRITICAL 3, SOFT state
1:13 - CRITICAL 4, SOFT state
1:14 - CRITICAL 5, HARD state, first escalation takes over (since it begins on the first notification)
1:44 - CRITICAL 35, HARD state, second notification from first escalation
2:14 - CRITICAL 65, HARD state, first notification from second escalation (1 hour after first notification from first escalation)
3:14 - CRITICAL 125, HARD state, second notification from second escalation

Re: email alert for Service Escalation not working

Posted: Wed Apr 29, 2015 11:07 am
by Box293
tmcdonald's repsonse explains what happens.
bosecorp wrote:* First escalation has the following config; first Notification=>1, Last notification=>120 and Notification Interval is 30
bosecorp wrote:... the second escalation should have been triggered 3 minutes after the first escalation, right
I want to make sure you are understanding escalations correctly.
bosecorp wrote:first Notification=>1, Last notification=>120
These numbers are not Minutes but the notification count, AFTER the service enters a HARD state.
first Notification means when this escalation takes affect. 1 means the 1st hard state.
last Notification means when this escalation stops taking affect. 120 means the 120th time it sends a notification, where each notification was sent 30 minutes apart.

So your second escalation definition is taking over from the first one at the 3rd notification sent (because of first Notification=>3), hence increasing the interval to 60

Does this make sense?

Re: email alert for Service Escalation not working

Posted: Thu Apr 30, 2015 8:38 am
by bosecorp
I have the following adjustments and this is what I am seeing now

Normal notification ==> every one minute with 1 minute delay
First escalation ==> first notification:1, Last Notification:60, Notification Interval: 5 minutes
Second Escalation ==> first notification:5, Last Notification:10, Notification Interval:30

once again, everything worked as expected all the way up the first escalation. when the second escalation was trigger, the people in this group received an alert every 5 minutes. they should have received the alert every 30 minutes.

Re: email alert for Service Escalation not working

Posted: Thu Apr 30, 2015 4:50 pm
by ssax
Please post the relevant serviceescalation definitions from your /usr/local/nagios/var/objects.cache (should be towards the bottom).

Re: email alert for Service Escalation not working

Posted: Thu Apr 30, 2015 4:58 pm
by tmcdonald
I think I know what is going on. Are you using separate groups for these escalations?

You have overlapping escalations, so technically both are in effect at once. The second escalation begins at notification 5, and goes out every 30 minutes. However since the first is still going, it is going out every 5 minutes. The second escalation is only good for 6 notifications (5th, 6th, 7th, 8th, 9th, and 10th) and 6x5 = 30, or 30 minutes. So by the time that 30 minutes passes (from the first escalation) the second escalation is no longer valid.

I might not be understanding completely your setup, but does this make sense? Try changing the last notification for the second escalation to 20 and see if that 30-minute interval takes effect.

Re: email alert for Service Escalation not working

Posted: Thu May 07, 2015 10:48 am
by bosecorp
I think is clear now how this work. you can go ahead and close the ticket