All Apps and Add-ons

How does the moving average work?

rosho
Communicator

Hi

How does the "moving average work"?
With "trendline" I am computing 5 and 10 events. But with "streamstats" I am computing the statistics of only 5 events.

I do not understand.

This is the SPL from the MLTK.

| inputlookup cyclical_business_process.csv
| trendline sma5(logons) as sma5_logons ema10(logons) as ema10_logons
| eval this_date_day = strftime(_time, "%w")
| eval this_date_hour = strftime(_time, "%H")
| eval this_date_day = strftime(_time, "%w")
| eval this_date_day = this_date_day."_"
| eval this_date_hour = this_date_hour."_"
| reverse
| streamstats current=f window=5 first(logons) as LogonsFromTheFuture
| reverse
0 Karma
Get Updates on the Splunk Community!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...