Host Escalations

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
rentsys
Posts: 98
Joined: Wed Oct 16, 2013 11:57 am

Re: Host Escalations

Post 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
        }

User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Host Escalations

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
rentsys
Posts: 98
Joined: Wed Oct 16, 2013 11:57 am

Re: Host Escalations

Post 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.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Host Escalations

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
rentsys
Posts: 98
Joined: Wed Oct 16, 2013 11:57 am

Re: Host Escalations

Post 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 :oops: . 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. :lol:

P.S. where is the file that controls escalations located. I kinda wanna see if I can change it.
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Host Escalations

Post 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
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Locked