Use variables in any panels threshold

Good morning everyone!

I recently started working with grafana and it has been an absolute blast so far!
However, I want to create a dynamic dashboard that uses values from a SQL server as the thresholds for panels. For example: a gauge with a value from a SQL database, and a max threshold also taken from a SQL database, so that $variablename or something like that can be used.

Now I realise that this question has been asked multiple times before. Really often actually. So this topic merely serves as a way to reach out to the developers to receive a little more information about it and if it will ever be added. Since the next topic on github posed the exact same question in 2014!! Yet no further information was provided other than developers reacting on other issues ā€œthis is a duplicateā€ (which will probably happen to this one as wellā€¦)

Best regards,

Ruud

2 Likes

For anyone else trying to solve this problem, I found Torkelā€™s comment on the Github issue linked to this one met my needs:

2 Likes

Dynamic Thresholds using variables in Grafana
@torkelo
I am using Grafana Dashboard to display some of my Treemap panels where I needed Dynamic Threshold using variable.
Inside variable here I am using query to get low and high thresholds value and those values I need to use in my Treemap panels.
But i didnā€™t find any way to do this. I tried config-from-query-results transformations but here also two mains issues:

  1. I can not set coloring here as i was use to do with static threshold.
  2. I can not set multiple thresholds.

Second way I tried to use value mapping but here also I was stuck as only fixed value I can use but I can not use variable here.
Please help ??

  1. I can not set multiple thresholds.

Iā€™ve also had this issue when using the Prometheus datasource. What datasource are you using?

I created a bug report for my issue here:

Hi @samjewell I am using druid.
Did you find any solution for this issue?

No I didnā€™t find a solution yet, sorry