'Grafana only alert first error because condition state doesn't change
I have a MSSQL query that monitor open transactions and returns me their open time in seconds, when some transaction is open for more than 10s, i send a notification. This works fine, but I'm having a problem is this scenario:
- A transaction is open for 5s and I open another one.
- Now I have two transactions, the first one with 5s, and the other one with 0s. When the first one reach 10s I will receive a notification, and the second will be with 5s.
- If both my transactions keep open when the second one reach 10s, i will not receive a notification, because the first one is still open.
And that's the problem, I must get the notification in both cases.
I've tried with the version v8.1.2(legacy alert), and v8.4.3(Unified alerting)
I know the problem is because my condition doesn't change it's state: once one of my transactions reach 10s, its state become 1 (as show in the following image), and it will notify me again only when this state go back to 0, and then 1 again. But I don't kwon how to work around this problem.
Solution 1:[1]
I am encountering similar issue. Basically we need an option to reset the alert state after certain amount of time. Since this feature is not available, we can get around by using a combo-query with a lookup table for on/off status base on time of the date (i.e. odd/even sec, min, etc) or other data sets. I am using this work- around for our after hour quiet time alerts (i.e. not sending alerts - phone calls - at night time).
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | DharmanBot |
