Hi! Regarding alert rules in Grafana, there is any way to generate multiple alerts where the value of parameters from the query is different, taken from a list of values maybe? For example, if my query in PromQL is my_metric{status=“x”}, I want an alert rule for every value of x=[400, 401, 404, 409].
Yes. You can create thresholds in your labels and keys at the bottom:
{{ if gt $values.B.Value 90.0 }}Critical{{ else }}Warning{{ end }}
So what this is doing, in my B expression, if the value is over 90%, it sets the severity to Critical. Below that it is a Warning. I have a label that is Severity and then this formula in the key. I created different notification policies based upon the threshold as well