I have just started working on Grafana and Prometheus to develop a dashboard. In my Grafana dashboard, I am trying to add an Ad-hoc Filter that allows users to select the values from dropdown.
Following is sample Prometheus data
Element , Value
default_jenkins_builds_last_build_result{instance="jenkins-m1.abc.com",jenkins_m1_prod="XXX/YYYY/AAA",job="jenkins-m1",repo="ABC"}, 0
default_jenkins_builds_last_build_result{instance="jenkins-m2.abc.com",jenkins_m2_prod="XXX/YYYY/BBB",job="jenkins-m2",repo="BCD"}, 0
default_jenkins_builds_last_build_result{instance="jenkins-m1.abc.com",jenkins_m1_prod="XXX/YYYY/CCC",job="jenkins-m1",repo="ABCD"}, 0
I want to add an Ad-hoc filter for the instance label in Grafana. Below is an example of my current progress. You can see that I am not getting any results in the dropdown. I have also added the snippet of the configuration of the ad-hoc variable.
I am assuming that somehow my query is incorrect which is why it is not returning any results. So, Can someone help me to get on the correct path where the dropdown should display two options from the above sample data "jenkins-m1.abc.com" and "jenkins-m2.abc.com"?
Thanks