Silence Alert after [Resolved]

I’ve set up an alert for a panel which reports humidity. I want to get notified with an E-Mail when the value of the panel drops below 25% which works as intended. The problem is, that the value fluctuates heavily, which leads to multiple Alert- and Resolved-E-Mails in a short period of time. How can I keep the pending period of the alert low and still only get for example one alert and one resolve per 24 hours? I looked for an “silence for x hours after alert” option but didn’t found any.
Thanks in advance!

It sounds like you want to smooth out the data. Instead of alerting when the panel drops below 25% for a single observation, alert when the panel drops below 25% and remains below 25% for 5 minutes? Just an example, 5 minutes can be replaced with another time duration. You can use the For duration for this, or smooth the data in the query for your datasource.

Thanks for your answer. The problem in my specific case is, that if the value drops below 25%, a colleague of mine has to get to the location where the sensor is placed, so that he can do something about it. This is pretty time critical. If I am smoothing out the data, the alert will be send at a later point in time, which is why I want to keep the pending period low. After the first alert, he is already on his way, so I (and he) don’t need any further alerts for the next x hours. This is why I want a low pending period for my alert and a silence for x hours after an alert.

But it seems like there is no functionality in the UI for that, so I will try to solve this with a script and some API calls to the grafana instance.

It sounds like this might be solved with the new Hysteresis feature in Grafana 10.3 (Alerting: Support hysteresis command expression by yuri-tceretian · Pull Request #75189 · grafana/grafana · GitHub). This will let you set different thresholds for firing and resolving per rule.

If I understand the use case, you’re saying that if the value drops below 25% once, someone has to go take a look at it. Between the time that the person leaves and fixes the sensor, it can behave “erratically” (i.e. say fluctuate between 0% and 100%) - presumably because it is damaged or broken?