We had a situation where we sent an event and the status didn't change for 74 days on the service. Turns out the event originally may have been dropped due to a downtime on the device.
Is there a clear setting in the config to resend event handlers say every 7 days if the status has stayed in error or warning???
I know we've scripted cases like this but wanted to see if there was a way to set this up internally. And generally we want to retain status information...
Nagios XI event Handler question
-
npolovenko
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: Nagios XI event Handler question
Hello, @JakeHatMacys. Event handlers fire off only on service status changes. There is no recurring option for event handlers. And event handlers should still be active during the scheduled downtime. In the scenario you described scripting seems to be the only option.
PS: Actually if you turn on the "Is Volatile" option under Check Settings, XI will treat each service recheck (in a hard non-OK state) as a state change and the event handler will fire each time.
https://assets.nagios.com/downloads/nag ... vices.html
You'll still need to come up with a custom logic in the script that will resend notifications with a certain interval.
PS: Actually if you turn on the "Is Volatile" option under Check Settings, XI will treat each service recheck (in a hard non-OK state) as a state change and the event handler will fire each time.
https://assets.nagios.com/downloads/nag ... vices.html
You'll still need to come up with a custom logic in the script that will resend notifications with a certain interval.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
-
JakeHatMacys
- Posts: 281
- Joined: Thu Sep 25, 2014 3:21 pm
Re: Nagios XI event Handler question
Is there a custom command to restart Nagios and not retain status on Services? I was thinking if I could cron up that custom restart specifically every 7 days it would fit my needs.npolovenko wrote:Hello, @JakeHatMacys. Event handlers fire off only on service status changes. There is no recurring option for event handlers. And event handlers should still be active during the scheduled downtime. In the scenario you described scripting seems to be the only option.
PS: Actually if you turn on the "Is Volatile" option under Check Settings, XI will treat each service recheck (in a hard non-OK state) as a state change and the event handler will fire each time.
https://assets.nagios.com/downloads/nag ... vices.html
You'll still need to come up with a custom logic in the script that will resend notifications with a certain interval.
-
npolovenko
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: Nagios XI event Handler question
@JakeHatMacys, You can create a script that will stop the nagios service, delete the retention.dat file and then start the nagios process back up.
*Retention.dat file contains scheduled downtime entries, host and service acknowledgments, host and service check states. So all of that will be gone. But that's what you want, right?
Run this script every 8 days.service nagios stop
rm /usr/local/nagios/var/retention.dat
service nagios start
*Retention.dat file contains scheduled downtime entries, host and service acknowledgments, host and service check states. So all of that will be gone. But that's what you want, right?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
-
JakeHatMacys
- Posts: 281
- Joined: Thu Sep 25, 2014 3:21 pm
Re: Nagios XI event Handler question
Sounds like it will do the trick. Just need to make sure nothing is affected like Services that have been disabled in Core etc. I'll give it a whirl thanks!npolovenko wrote:@JakeHatMacys, You can create a script that will stop the nagios service, delete the retention.dat file and then start the nagios process back up.Run this script every 8 days.service nagios stop
rm /usr/local/nagios/var/retention.dat
service nagios start
*Retention.dat file contains scheduled downtime entries, host and service acknowledgments, host and service check states. So all of that will be gone. But that's what you want, right?
-
npolovenko
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: Nagios XI event Handler question
@JakeHatMacys, Deactivated services in CCM will stay deactivated. Sounds good.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.