Closed krische closed 6 years ago
Hi,
Sorry for the late reply!
You can actually calculate the value in Grafana by going into edit mode on the query (the hamburger icon, toggle edit mode) where you can write full InfluxDB queries, like this:
SELECT mean("size-used") / mean("size-total") * 100 FROM "aggr-usage" WHERE "netapp" =~ /^$netapp$/ AND "aggregate" =~ /^$aggregate$/ AND $timeFilter GROUP BY time(5m) fill(null)
(it's an example of percentage query i have)
Cheers, Adrian
I would like to display the usage of my datastores as a percentage in Grafana. However, as far as I can tell, it is not possible to "compute" this value in Grafana with the InfluxDB data source with just the
capacity
andfree_space
values.Thus I added another datastore field
usage
that computes the usage of a datastore as a percentage (0.0 - 1.0) in the script and stores the value in InfluxDB.