"All" value in any variable is creating issue while using Alertmanager as a datasource in Grafana.

13 views
Skip to first unread message

Yagyansh S. Kumar

unread,
Mar 12, 2020, 3:11:07 AM3/12/20
to Prometheus Users
Hi. I have made a variable "cluster" in Grafana that contains all my clusters(ADS,TV etc.) present in my Infra.
Now, I want the critical alert count for every service(CPU, Memory, Disk) clusterwise which I am getting successfully using the alertmanager query - alertname="CPULOAD", cluster="$cluster" .
This works fine when I select a particular cluster. But when I need the total critical count for that service, I select "All" in the cluster variable and it breaks. 
Can someone help? Or suggest a better method, if any.

Thanks in advance.

Brian Candler

unread,
Mar 12, 2020, 4:55:29 AM3/12/20
to Prometheus Users
If you are using multi-select in Grafana, you have to write your label match as cluster=~"$cluster"

Yagyansh S. Kumar

unread,
Mar 12, 2020, 9:17:04 AM3/12/20
to Prometheus Users
Oh man! Can't believe I missed the tilde.
Thanks Brain.
Reply all
Reply to author
Forward
0 new messages