Remember that a PromQL query in general gives more than one timeseries in
its result, and each timeseries will have a distinct set of labels.
Labels are strings, and the label's value is already there in the results.
What exactly do you want to do with the label value(s)?
* If you are sending a PromQL query via the API, then you'll get a JSON
object as the response, so you just extract the values of interest directly.
* If you want to count the number of metrics with each value of a given
label, then you can use PromQL: count by (cluster_status) (... rest of
query ...)
* If you're using Grafana then you can use labels in graph legends, e.g.
Cluster:
{{instance}} {{cluster_status}}
and you can set variables based on label values, e.g.
label_values(discovering_paas_clusters,
cluster_status)
--
You received this message because you are subscribed to the Google Groups
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/prometheus-users/c29fe301-d81e-4e26-b00a-3ead9e9a194fo%40googlegroups.com.