Use query for field "Max" value in gauge visualization

Hi everyone!
I’m using Grafana 7.0.6 and need your help with creating a gauge visualization.
The goal is to visualize disk usage of some linux VMs and configuring the “Max” value dynamicly.
Using a fix value for the “Max” field, everything is working fine, but, of cause, nearly every VM has different disk sizes. Here’s a screenshot of what I need (with fix value):

I wrote a query, witch result is exactly the value I need, but how can I get this value in the “Max” field?
Here’s a screenshot of what I mean:

As a next step, I will have to do the same for the “threshold” fields. Does anybody know if this will be possible in the same way?

Hopefully somebody does understand what my problem is.

Many thanks in advance and best regards! :slight_smile:

Why not use the threshold in percentage mode? Then it won’t matter what the specific value is.

Hi Diana,
of cause, you’re so right… sometimes, the solution is so easy :smiley:
Thank you so much!

But what about my first question? How do I get the volume size in the “Max” field?

Best regards!

Hello everyone,

I solved it by myself :slight_smile:

The solution is to select two fields in one query, instead of using two queries, and select the field that should be included in the panel.
That’s it! :slight_smile:

https://www.youtube.com/watch?v=YwVAzA4ZgHU might be what you are looking for
6:23 starts with the solution

Could you show what your query looks like in the raw query mode? Rather than the query builder in the image? I need to build the query manually, ban am not sure how it looks when you need to select two fields (as you have done).

Thanks

This would not work for me, because it kept automatically using the higher number as the max, but over 100% was possible for me. The youtube video below worked