Singelstat Text-Color from Prometheus Label

What Grafana version and what operating system are you using?

Grafana Version: 8.1.2

What are you trying to achieve?

I am trying to create a singlestat panel using this prometheus query:
up{job="$job", instance=~"$instances"}

I want the singlestat panel to display the label “alias”
The color should be mapped to the result of the query (“Value”), according to the thresholds.

How are you trying to achieve it?

  • Created the query

  • Set the panel to dislpay the alias:
    grafik

  • Set the tresholds

  • I tried using overrides, but it looks like one label can only affect the color of itself:

Any idea how this could be done?

Thank you for your help :slight_smile:

Hi @earthwalker31

So one quick question for clarity: are you using the stat panel that ships with Grafana 8 and which replaced the former singlestat panel, or did you manually install the legacy plugin? Not likely, but want to confirm. Also:

Can you clarify this a bit? Maybe include screenshots of what your panel looks like now and where you’d like to get it? Panel JSON could help other members help you better too :sunglasses:

This topic was automatically closed after 365 days. New replies are no longer allowed.