Grafana: [Feature Request] Gauge min/max value as variable

Created on 6 May 2016  ·  90Comments  ·  Source: grafana/grafana

Hi,
It's will be nice if we could use a variable as min and max value in gauge panel.
In my case, I monitor utilization of data and have data formatted like this :

Login | Space used | Quota
Foo   | 35 Gb      |50 Gb
Bar   | 65 Gb      |100 Gb 
...

So "space used" is the query result and "Quota" should be Max value of gauge.
I think that is there other usage of variable as min/max value.

Thank you very much for your great job !

arepanesinglestat typfeature-request

Most helpful comment

Please add your reaction to the first post instead of posting a +1 message. People subscribed to notifications of this issue will appreciate it. Thanks.

All 90 comments

Ohh, i want exact this!
as example: We have many tomcat container here, and i will display the used memory, gc and other values in a gauge panel.
i need an configurable max value for this.

I wan this too! My use case is to display a gauge of disk/file-system usage where max is based on a non-visualized query (disk1.Total)

I'm totally +1 for it , one simple use case:

Number of user login inside an application
Maximum value : Grab the highest value of user login since 7 days

Another +1 from me.

I'd love this feature to be able to display the number of "up" devices out of a total instead having 2 individual stats, "up" and "down".

Another +1 from me.

I'm seconding this, I can think of countless applications for this feature at work :)

+1 from me.

That feature would really come in handy.

+1, just tried to do this and was devastated that it didn't work.

+1 This is really needed.

+1 it would be really useful

Monitoring OSDs in a Ceph cluster, could also use this feature!

+1 here too!

this would be really appreciated.

Hello,

Any defined milestone? Last update was for 4.2.0 but it obviously doesn't contain this shiny new feature :-)

Thanks for the great work!

+1 Definitely would use this, would be way better than having to manually update the max TB/PB when we grow a file system

+1

+1

+1

+1

+1, I was just trying to see if this was doable and came across this issue. It would be nice to see this get reworked into a new milestone since v4.2.0 has passed for some time.

+1

+1

+1 (I really need this!)

Another +1 from me. Wanted to see if I could set the max to be whatever the jam_threads_peak value was from prometheus metrics.

+1

+1

+1

+1

+1

+1

+1

+1

+1

+1

Please add your reaction to the first post instead of posting a +1 message. People subscribed to notifications of this issue will appreciate it. Thanks.

+1
I would definitely appreciate the use of variables in the gauges for max settings, as it is easy to query a value into a variable.

+1

+1

+1

+1, this will give us flexibility to monitor the disk usage, because disk capacity may change in the future, hardcode value give us a lot of boring work to update.

+1

+1

+1

This would definitely be useful! I have dashboard monitoring IPs leased per scope on my DHCP servers. This is based on a repeating panel for each scope. I'd love to be able to use a gauge to set the max and warning values dynamically. I'd need to use math to do this, where the max is used + free IPs since those are the two stats I have available. Of course, I could manually set up this dashboard, but I have hundreds of scopes to monitor.

I always thought it would be great to add more than one query to the SingleStat panel and then just use the additional queries for min, max, etc....

I'd like to use it show Connection Speed Ranges of 30+ sites with varying max values. So +1!

+1, it's very useful if we have this feature

+1 for max please! Gauge is almost useless without it for me.

+1 the same for me, i need this feature too.

+1

+1

+1

How come it seems that ALL the people receive those annoying notification EXCEPT the maintainers :s 🤔

We see them all right , about a 100 a day :). Anything we should do about it?

To the people having to adjust every gauge when something like disk space changes, why not display a usage in percentages? So current()/max()

I can still see how this feature request is an improvement to that, but I thought it could help in the meantime.

@sanderploegsma Great idea as a workaround!
But I hope they will make it possible in the near future to use variables for min/max values.

@sanderploegsma Unfortunately that only is possible with certain backends, can't do that with InfluxDB AFAIK... ☹️

@sanderploegsma Unfortunately that only is possible with certain backends, can't do that with InfluxDB AFAIK... ☹️

It is possible, we are using it with InfluxDB with the following metric:

SELECT mean("used_space")/mean("total_space")*100 FROM "disk_space" WHERE ("hostname" =~ /^$server$/) AND $timeFilter GROUP BY time($__interval) fill(null)
Now all you have to do is to change the unit to percent (0-100), define your thresholds and configure max Gauge to 100 in the option tab

@dyordanovv Only works if your "total" value is contained in the same metric, which is not the case for me. Also this will only give you a percentage and not a gauge saying 572 MB / 1024 MB for example, which is useful to see at a glance.

So it would really be nice to be able to define a separate query for getting the max value, shouldn't be too hard!

+1
and generally speaking it would be great to allow using variables in other places like in Graph panel -> Axes -> Y-Max

Hello, can this be done with a custom plugin?
(asking in order to know if there is any "grafana" limitation about that or if we could do it ourselfs)

To the people having to adjust every gauge when something like disk space changes, why not display a usage in percentages? So current()/max()

I can still see how this feature request is an improvement to that, but I thought it could help in the meantime.

Singlestat (Multistat?) successor could allow:

  1. using more than one metric; A, B, C etc.
  2. refering to a metrics value result in min, max etc. or even in the display of stat values itself.

With such things in place, the rest could be made logical and simple, right?

Today, we end up sprinkling tons of repeat graphs for the same variable just to get the numbers clearly displayed.

Perhaps this is the thing where this needs to be done? -- https://github.com/grafana/grafana/issues/10358

Although, what I'm after is mainly a way to get a dynamic max value ... ie, simpler than a complete multistat panel.

This feature has been requested for almost 2 years now and working with non-percent value for the Gauge is a real pain without variable.
If you want to display other value that are totally different from each other (using variable to get multiple host name with InfluxDB), you can't use repeated panel in your dashboard.
For exemple i want to see the total GB used per host with gauges. The only way to do it is to create one panel for each value and get the total disk space manually and add it yourself to the max value of the gauge.

I really hope this feature will be implemented soon. (as far as i can see it's not yet in the nightly build 5.5.0-d95a42b3pre1)

+1

+1

+1 I really need this!, it’ll be so functional and usable for values that can change at any time. How is the status of this feature? I'm really excited about that.

+1

+1

+1

2019 +1

Is anyone working on this?

@ch-hristov Doesn't look like that. Please note though that the gauge functionality in singlestat is being migrated to a new panel called Gauge and is written in React. If you want to work with this it should be implemented for the React Gauge panel.

+1 Please

any updates? this would be useful for Plan/Fact metrics

+1

Could we stop with the +1? Just vote any other post. All others who subscribe to this issue get a stupid mail because you want to be "cool". Please stop.

Could we stop with the +1? Just vote any other post. All others who subscribe to this issue get a stupid mail because you want to be "cool". Please stop.

You can mute the thread ...

You can mute the thread ...

That is moronic. We subscribed to this thread for a reason, not to see people think they are cool by doing +1 like this is that dead thing called google+. We subscribed because we wish to see the progress on the issue, this is about Grafana. Let's keep it about grafana and it's features/issues whatever.

You can mute the thread ...

That is moronic. We subscribed to this thread for a reason, not to see people think they are cool by doing +1 like this is that dead thing called google+. We subscribed because we wish to see the progress on the issue, this is about Grafana. Let's keep it about grafana and it's features/issues whatever.

Fair enough

I was mainly looking into the bar gauge because I wanted horizontal bar charts, but needed dynamic/auto max values.
Found now that https://grafana.com/grafana/plugins/michaeldmoore-multistat-panel provides all of this already and works great for me.

+1

2020 +1

Hi,
I am very interested on that.
is anyone working on this at the moment?

This issue is open for nearly four years and it has so many likes but it does not get implemented? Why? I did not see any maintainer comment here? Or did I miss it?
The percentage workaround is only that, a workaround.
If you have examples like mentioned here with memory (RAM) or storage or (in my case) nodes in a cluster, percentage can give you an idea, but it is psychological different for human brains if you see percentages or a total value.

If I see our cluster has a usage of 70 percent or I see there are 70 Nodes in usage but 30 are idling, that makes a total difference in its statement and also helps to provide actionable information.
If I only have the percentage I need to do the math on my own or in another panel. But then I have two panels to get a good idea about the status instead of simply one really helpful panel.

This issue is open for nearly four years and it has so many likes but it does not get implemented? Why?

I'd love this to be implemented, but to answer the question above would be - because no one implemented it. People were busy, had another priorities, or simply did not know how to code. So no one submitted a PR and no one was able to put the efforts required. That's most likely why.

FYI.. this (at least in some form) will be coming in 7.0 as we have a more general property override infrastructure that lets you use template variables (and metadata from the query response)

This feature is more than 4 years old, so I don't think anyone will do it now, if it hadn't been done in 4 years. A possible workaround I implemented is with the Pie chart (this is the closest-looking to the gauge) with selecting two values (let's say we're displaying used RAM / total RAM):

  • select used RAM
  • select (total RAM - used RAM) - this gives the free RAM
    Picking pie chart for the job, it gives you a full circle with the used + free RAM as the slices.

FYI.. this (at least in some form) will be coming in 7.0 as we have a more general property override infrastructure that lets you use template variables (and metadata from the query response)

We have 7.0.3 now and this is still an issue. I simply can't imagine how people are using charts without being able to set the max value, it is a super big letdown for me.

This feature is more than 4 years old, so I don't think anyone will do it now, if it hadn't been done in 4 years. A possible workaround I implemented is with the Pie chart (this is the closest-looking to the gauge) with selecting two values (let's say we're displaying used RAM / total RAM):

* select used RAM

* select (total RAM - used RAM) - this gives the free RAM
  Picking pie chart for the job, it gives you a full circle with the used + free RAM as the slices.

@leppeles have you figured out how to do multiple hosts/instances or a host group in a single panel?

This feature is more than 4 years old, so I don't think anyone will do it now, if it hadn't been done in 4 years. A possible workaround I implemented is with the Pie chart (this is the closest-looking to the gauge) with selecting two values (let's say we're displaying used RAM / total RAM):

* select used RAM

* select (total RAM - used RAM) - this gives the free RAM
  Picking pie chart for the job, it gives you a full circle with the used + free RAM as the slices.

@leppeles have you figured out how to do multiple hosts/instances or a host group in a single panel?

Nope, in my case it was not needed.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

victorhooi picture victorhooi  ·  3Comments

yuvaraj951 picture yuvaraj951  ·  3Comments

KlavsKlavsen picture KlavsKlavsen  ·  3Comments

sslupsky picture sslupsky  ·  3Comments

utkarshcmu picture utkarshcmu  ·  3Comments