Exponential Moving Average

193 views
Skip to first unread message

Marc

unread,
Feb 6, 2019, 3:47:11 PM2/6/19
to Prometheus Users
Hello!

From what I read I can do a Simple Moving Average with avg_over_time . But what about Exponential Moving Average, is that possible using Prometheus (with Grafana) ? 

Thanks!

Brian Brazil

unread,
Feb 6, 2019, 4:56:16 PM2/6/19
to Marc, Prometheus Users
On Wed, 6 Feb 2019 at 20:47, Marc <maag...@gmail.com> wrote:
Hello!

From what I read I can do a Simple Moving Average with avg_over_time . But what about Exponential Moving Average, is that possible using Prometheus (with Grafana) ? 

No that's not possible. What math are you doing that requires it? 

--

Marc

unread,
Feb 7, 2019, 5:30:20 AM2/7/19
to Prometheus Users
Mostly financial. I have a table with profit for example, I'd like to use it to easily spot a trend. Using influxdb I can do: 
select exponential_moving_average(sum("EUR"), 20) from profit group by time(1d)

The same is often being done to spot trends in prices of stocks, forex, crypto etc. 

Brian Brazil

unread,
Feb 7, 2019, 5:35:10 AM2/7/19
to Marc, Prometheus Users
On Thu, 7 Feb 2019 at 10:30, Marc <maag...@gmail.com> wrote:
Mostly financial. I have a table with profit for example, I'd like to use it to easily spot a trend. Using influxdb I can do: 
select exponential_moving_average(sum("EUR"), 20) from profit group by time(1d)

The same is often being done to spot trends in prices of stocks, forex, crypto etc. 

That's not something you can really do in Prometheus, I'd use avg_over_time for that.

Brian
 

On Wednesday, February 6, 2019 at 10:56:16 PM UTC+1, Brian Brazil wrote:
On Wed, 6 Feb 2019 at 20:47, Marc <maag...@gmail.com> wrote:
Hello!

From what I read I can do a Simple Moving Average with avg_over_time . But what about Exponential Moving Average, is that possible using Prometheus (with Grafana) ? 

No that's not possible. What math are you doing that requires it? 

--

--
You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-use...@googlegroups.com.
To post to this group, send email to promethe...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/38de757e-316c-466e-a94f-d325da132efa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--

Matthias Rampke

unread,
Feb 8, 2019, 4:59:55 AM2/8/19
to Brian Brazil, Marc, Prometheus Users
There is https://prometheus.io/docs/prometheus/latest/querying/functions/#holt_winters – I never fully got the math behind Holt-Winters, but IIRC it's a fancy version of exponential moving averages. Maybe with appropriate scaling/trend factors it does what you need?

/MR

Reply all
Reply to author
Forward
0 new messages