Provided with some prometheus series:
query_duration{datname="audit_log", group="grok-pg", instance="docker.for.mac.localhost:9144", job="grok-pg", ts="21-05-19 12:18:10.965"} 14.859
query_duration{datname="audit_log", group="grok-pg", instance="docker.for.mac.localhost:9144", job="grok-pg", ts="21-05-19 12:19:27.603"} 10.082
Grafana is able to recognise variable datname if I assign a specific value:
However if I treat it as a variable then it does not work:
What am I missing? Thank you for your attention
$datname is a Grafana variable whose value needs to be set by Grafana before the expression is evaluated and sent to Prometheus to get the data.
Need to set the variable in Settings > Variables.