How to clear alarms using alertid

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Post Reply
Anto
Posts: 16
Joined: Tue Aug 11, 2020 12:06 pm

How to clear alarms using alertid

Post by Anto »

Hi Team

From a database monitoring tool I'm receiving traps for various metrics when they exceed the thresholds.
For example I receiving traps named "Total activity time" when one sql statements exceed the thesholds like this:

New WARNING Alert 5482: Total activity time on xyz : Warning threshold: 300 s Total activity wait time: 44 s Rows returned: 0 Total activity time: 347 s Total CPU time: 1778 ms Rows read: 270429 User: xyz Application name: xyz Client hostname: .... Application handle: ...

and a clear traps when the statement is completed:

Closed WARNING Alert 5470: Total activity time on xyz:

I send these type of alarm to a nagios service called "Total activity time" and my question is about to selectively clear just the alarms with the same alertid that in the example is "Alert 5482".
Does anyone know if this can be done?
sgardil
Posts: 355
Joined: Wed Aug 09, 2023 9:58 am

Re: How to clear alarms using alertid

Post by sgardil »

Hey @Anto

From the sounds of it if you have this data sent to a service, you should be able to create an event handler to do exactly what you want. I'll link some documentation on event handlers with nagios. If you want you can search for event handlers made by the community on our exchange site to see if anything matches. If you find one you'll still need to change some of the code to do exactly what you want but it could give a baseline. Hope this helps.

https://assets.nagios.com/downloads/nag ... ios-XI.pdf
https://assets.nagios.com/downloads/nag ... dlers.html
https://exchange.nagios.org/directory/A ... t-Handlers
Anto
Posts: 16
Joined: Tue Aug 11, 2020 12:06 pm

Re: How to clear alarms using alertid

Post by Anto »

Hi @sgardil

Thanks a lot for your suggestion !
Post Reply