Display stacked values with a single line

Hello Folks,

Is it possible to change the display for stacking values where it displays a single line that is equal to the sum of individual measurements. For example: let’s say I collect /root available capacity from 3 servers. I would like to display total free capacity from all 3 servers as a single line, instead of 3 individual lines each stacked on top of another. I have not been able to figure out how to do it in Grafana so I have been playing with subquery query from InfluxDB but with very little success. Any pointers?

Thank you

I suppose it depends on the data model you have, but I do this all the time. The value from the different servers is in the same measurement, with one of the tags being the server name, like
disk,server=abc avail=500,used=1000
When the query returns the value for each of the servers, you ‘group by’ on the server tag. Use the ‘$tag_server’ in the ‘Alias’ for elegant display.
See also the "InfluxDB Server Monitoring’ dashboard panel “Nginx Req/s” on https://play.grafana.org/


I get individual lines for each server, granted they are stacked on top of another. Let’s say avail for server1 is 30G , server2 is 20G and server3 is 50G. I would like in grafana to display a single line showing 100G.

Misunderstood your desire… if you remove the “group by” and make sure to use sum() as aggregation, you get what I believe you’re looking for. I personally like the stacked breakdown because of the extra detail at little cost (like in your case, it would be helpful to see one of the servers has far less free space than others). And I use the “fill” rather than “line” so you get an area chart. But it only works when the number of categories is small enough.