TL;DR; how do I aggregate multiple series to give a sum value for each point in time, and then aggregate this sum-series by percentiles across time?
I collect data on a 30 second cadence from multiple hosts and ship it to Elasticsearch. I look at multiple hours worth of data at a time, so I use 95th percentile to remove any outliers and give a general sense of usage.
In Grafana I do this by using a query with Metric: Percentiles
and Group By: Terms
Then By: Date Histogram
.
I am having trouble determining how sum across the series at the collection cadence and then apply the 95th percentile to aggregate across time. Is this possible in Grafana accessing Elasticsearch?
In Flux Query Language it would be something like:
...
|> aggregateWindow(every: 30s, fn: sum, createEmpty:true )
|> aggregateWindow(every: ${interval}, fn: (t=<-, column) => t |> quantile(q: 0.95), createEmpty:true)
Thanks in advance!