Search code examples
metricsinfluxdbgrafana

Is there a way to have a moving average in Grafana?


I didn't find a 'moving average' feature and I'm wondering if there's a workaround.

I'm using influxdb as the backend.


Solution

  • Grafana does no calculations itself, it just queries a backend and draws nice charts. So aggregating abilities depends solely on your backend. While Graphite supports windowing functions such as moving average, InfluxDB currently doesn't support it.

    There are quite a lot requests for moving average in influxdb on the web. You can leave your "+1" and track progress in this ticket https://github.com/influxdb/influxdb/issues/77

    Possible (yet not so easy) workaround is to create a custom script (cron, daemon, whatever) that will pre-calcuate MA and save it in a separate influxdb series.