Classic Condition Not Working

  • What Grafana version and what operating system are you using?
    Grafana V 9.0.3

  • What are you trying to achieve?

sent Alert when problem

  • How are you trying to achieve it?
    I’m using Classic condition but it’s not working

My setting Alert

  • What happened?
    I’m set “Conditions Is Above 10” I don’t receive an alert

My datasource Elasticsearch 8.x

Did you watch this video? In it, he creates 3 queries…

A: keep yours as is
B: change to a Reduce expression (something like this)

C: create Math expression (something like this)
(my guess is that your expression would be avg({B})>10 but try variations if that does not work)

And finally…

Please report back any success or failure, as there are a lot of questions/issues on the forum about alerting and very few solid working examples.

I’m trying it

but I don’t receive an alert

OK, so you will have to explore more deeply your Alerts page to see if it ever goes from Normal to Pending to Firing. I found that while I would get “Alerting” on the Preview Alerts table (as you do), I was not getting the Alerts page to display “Firing”. I even posted here about it, although the answer provided was not really satisfactory.

I spent more time with this and eventually got it to work for a single parameter (not a multidimensional alert) by removing the time field (but I am using Influx, not Elasticsearch). I plan to post my solution in the coming days when I have some time to do a writeup. In the meantime, try to do a deep explore of your data and try to figure out if there could be any reason(s) for not receiving an alert, even though you received Alerting on the above screen.

I’ve read your post when I add visualization Alert Status and see pending is time <1m
in your post “It is possible that the missing values are causing the alert to return to either OK state, or DatasourceNoData state, both of which will “reset” the pending timer.” maybe because I don’t receive the alert. But last my data is always > 10.
I don’t know why sometime the last data return is 0