Hello,
We use the global event handler processing with a script that executes each time an event comes in. This passes information to an API for service now so we can auto-create tickets for things when problems happen. For the most part this is working pretty good and we like the ability service now has to put logic into the events that come in and only create alerts for necessary things based on hostgroup criteria.
When we have large outages (a WAN link goes down), nagios will suddenly see a large number hosts suddenly go down, even if the parent relationship is setup correctly to moniitor a WAN link, during the time it figures out the WAN link is down, there may be several hundred or more hosts that get marked as down which will flag the eventhandler processing for all that. We find that once these global outages are fixed (maybe 10 minutes later), the eventhandler processing still continues to send "old" events (it will say something is down when it's not down).
Does anyone know of any commands that can be run on the nagios master that will "clean out" all the queued up eventhandler actions?
Thanks,
Dan
Manually clearing queued up eventhandler processing
Re: Manually clearing queued up eventhandler processing
Events are queued up in xi_events I believe:
echo "select * from xi_events" | mysql -uroot -pnagiosxi -Dnagiosxi
You can delete items in here or clear everything out with:
echo "delete from xi_events" | mysql -uroot -pnagiosxi -Dnagiosxi
echo "select * from xi_events" | mysql -uroot -pnagiosxi -Dnagiosxi
You can delete items in here or clear everything out with:
echo "delete from xi_events" | mysql -uroot -pnagiosxi -Dnagiosxi
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Manually clearing queued up eventhandler processing
Thanks for the information. That command does clear out the event queue! Next time we have larger wide spread outage I will keep this command handy.cdienger wrote:Events are queued up in xi_events I believe:
echo "select * from xi_events" | mysql -uroot -pnagiosxi -Dnagiosxi
You can delete items in here or clear everything out with:
echo "delete from xi_events" | mysql -uroot -pnagiosxi -Dnagiosxi
-Dan
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Manually clearing queued up eventhandler processing
Glad we could help!
Locking
Locking