Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compute usage percentage of datastore. #81

Merged
merged 1 commit into from
Aug 9, 2018
Merged

Conversation

krische
Copy link
Contributor

@krische krische commented Jun 25, 2018

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 and free_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.

@sofixa
Copy link
Member

sofixa commented Jul 13, 2018

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

@sofixa sofixa merged commit 57703fa into Oxalide:master Aug 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants