prometheusgrafanagrafana-variable

Grafana Prometheus Variable using multiple metrics


I am using Grafana with Data Source Prometheus. I have 2 metrics which is working fine in table

Both the metrics have a same column name - Company Site

Now I wanted to create Variables which it should be used to filter both the tables. I am using Grafana V11 enter image description here


Solution

  • We can use this following Query in Classic Query in Grafana Variables to add all the value from 2 metrics using Prometheus Query.

    label_values({__name__=~"webex_users|missed_webex_hosts", job="pushgateway"}, Company Site)