Page 3 of 3
Re: Host Escalations
Posted: Wed Jun 18, 2014 2:49 pm
by rentsys
scottwilkerson wrote that
scottwilkerson wrote:Now I may be confused to the desired behavior , but you can overlap escalation, whereas this would be valid
Code: Select all
define hostescalation {
host_name TestUnknown124,TestUnknown125
contacts rentsys
first_notification 1
last_notification 0
notification_interval 0
escalation_period 24x7
escalation_options u,r
}
define hostescalation {
host_name TestUnknown124,TestUnknown125
contacts robertsa
first_notification 1
last_notification 0
notification_interval 0
escalation_period 24x7
escalation_options d,r
}
Re: Host Escalations
Posted: Thu Jun 19, 2014 1:11 pm
by lmiltchev
If you don't want "robertsa" to receive escalated alerts on recoveries, you can change the escalation definition to:
Code: Select all
define hostescalation {
host_name TestUnknown124,TestUnknown125
contacts robertsa
first_notification 1
last_notification 0
notification_interval 0
escalation_period 24x7
escalation_options d
}
Let me know if this helped.
Re: Host Escalations
Posted: Thu Jun 19, 2014 1:54 pm
by rentsys
I don't want "robertsa" to receive recovery alerts if the previous alert was unreachable. I want "robertsa" to receive recovery alerts if the previous status was down. So by escalating the unreachable alerts to "rentsys" the recovery alerts should only go to "rentsys" not "robertsa" when the previous state was unreachable.
Re: Host Escalations
Posted: Thu Jun 19, 2014 3:25 pm
by lmiltchev
I don't want "robertsa" to receive recovery alerts if the previous alert was unreachable. I want "robertsa" to receive recovery alerts if the previous status was down.
Again, this is not possible. Recoveries are received when the host recovers (changes state to "OK") regardless of whether it was in a "down" or "unreachable" state. You can either set up "robertsa" to receive alerts on recoveries, or not receive them at all. I hope this makes sense.
Re: Host Escalations
Posted: Thu Jun 19, 2014 3:37 pm
by rentsys
After a few more tests with escalations, I realized what you guys were trying to tell me. If I use the 'u' escalation option then I won't be able to get a recovery notification if I don't have 'r' selected

. Thanks for helping me solve my problem. I thought that 'u' escalation only applied to the first escalation then I would get a recovery notification for the second escalation. Just saying, in the future, if you ever want to set up nagios of being capable of knowing its last notification it sent out then that would be the easiest way. haha I think this is the first time in two years that I have to tell my boss that nagios can't do something that he wants.
P.S. where is the file that controls escalations located. I kinda wanna see if I can change it.
Re: Host Escalations
Posted: Thu Jun 19, 2014 4:51 pm
by sreinhardt
Well, it could if there was a specific notification script\handler that would remember that for you, but otherwise you are correct core it's self cannot do this. My guess is that there would be many locations you would need to change for altering these sorts of notifications. This is especially true with regular host\service notifications not to mention adding in escalations for both. You are more than welcome to take a shot though.
https://github.com/NagiosEnterprises/nagioscore