grafana-discrete-panel icon indicating copy to clipboard operation
grafana-discrete-panel copied to clipboard

Allow Prometheus label to be a "value"

Open finkr opened this issue 5 years ago • 3 comments

I use Grafana with Prometheus.

Rather than showing the value of a timeserie , I want to show a Prometheus label value (software version...), quite like in this example for the line "Agent (version)": panel exemple It would be nice to document how to achieve this (I beleive it isn't possible with Prometheus yet. is it ?)

For exemple, considering a metric like prometheus_build_info, the label version would be used as the value.

prometheus_build_info{instance="localhost:9090",version="2.8.0"}
prometheus_build_info{instance="localhost:9090",version="2.9.0"}

Ideally, both series should be merged on a single timeline like this: image

finkr avatar Nov 27 '19 15:11 finkr

i have a similar use case when i want to show some tag information from influx instead of the values. i have the values in other panels but would like to show which tag that was worked on in a machine for a set of time (there can only be one at a time since the tag is telling variant in a discrete production for a production cell)

benganellison avatar Jan 17 '20 09:01 benganellison

Prometheus not supported?

llonca13 avatar May 18 '20 19:05 llonca13

With Grafana 7+ you could use the transform feature.

For example if you have the series with the only one label state you could add the following transforms: image

VVvKamper avatar Aug 26 '20 17:08 VVvKamper