SignalFx Developers Guide


The ewma method calculates the exponentially weighted moving average (EWMA) of the stream during the specified time duration, or based on a smoothing parameter. The Wikipedia article on Moving average contains a section that describes Exponential moving average.

Syntax (time duration)


Table 1. Parameter definitions
Parameter Type Description


Duration (number and duration units indicator)
Durations are specified as a number followed by a single character:

  • s: seconds

  • m: minutes

  • h: hours

  • d: days

The default is None.

Optional: The duration over which to calculate the exponential weighted average for the input timeseries

Syntax (smoothing parameter)


Table 2. Parameter definitions
Parameter Type Description


Decimal, 0.0 ≤ damping ≤ 1.0. Default is 0.0

Optional: The smoothing parameter used to calculate the exponential weighted average of each input timeseries

Both forms return a reference to the input stream object.


The function calculates the exponential weighted average for a rolling time duration.

If you specify a duration, the function may do the calculation on on rolled-up data. In particular, long durations may alter the job resolution.

If you specify a smoothing parameter, the function always does the calculation at the resolution of the input stream. In particular, a smoothing parameter doesn’t alter the job resolution. Smoothing values closer to zero specify more smoothing. The smoothing parameter determines the number of slots in the smoothing window; a value closer to zero produces more slots.

Smoothing values that approach one asymptotically have little effect on the input stream. Conversely, smoothing values that approach zero asymptotically produce streams that lag behind the input. You should start with a smoothing value of 0.1 to look at initial results.

You can’t use this method to aggregate time series.


A = data('jvm.cpu.load')

© Copyright 2020 Splunk, Inc.

Third-party license information