In the Grafana documentation, I found that I should be able to query my Prometheus server for all instances delivering monitoring data using the label_values
query.
The query I'm using in Grafana is:
label_values(up, instance)
Unfortunately, Prometheus tells me that it is not aware of label_values:
Error executing query: parse error at char 13: unknown function with name "label_values"
I am using Prometheus 2.0.0 and Grafana 5.
What am I doing wrong?
label_values()
is only a valid function within templating. You can use it to populate a template dropdown with e.g. a list of available instances or available metrics but you can't use it within a dashboard or when querying Prometheus directly.