I want to convert it to an expr, I tried this
avg_over_time(A[5m:1m]) > 20 or avg_over_time(B[5m:1m]) > 15
but it didn’t work for me.
do you have any suggestions ?
I would recommend upgrading to the latest version of Grafana. The alerting features have been given a major overhaul and you are using what is called legacy alerting.
How many alerts do you have working in your current version right now? You should expect to spend some time redoing alerts in the new version of Grafana.