Manually clearing queued up eventhandler processing

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
da1701d
Posts: 23
Joined: Tue Jun 25, 2013 3:57 pm

Manually clearing queued up eventhandler processing

Post by da1701d »

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
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Manually clearing queued up eventhandler processing

Post by cdienger »

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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
da1701d
Posts: 23
Joined: Tue Jun 25, 2013 3:57 pm

Re: Manually clearing queued up eventhandler processing

Post by da1701d »

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
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.

-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

Post by scottwilkerson »

Glad we could help!

Locking
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked