Previous: formula-transform, Up: Datapoints and Transforms [Contents]
<transform plugin="sampling-transform"> <window samples="10"/> <!-- or duration="5m" --> <reduce>avg</reduce> <!-- avg | min | max | median --> <mode>sliding</mode> <!-- sliding | hold --> </transform>
window samples="N"Fixed-length sample window.
window duration="..."Time window: 300, 300s, 5m, 1h.
Requires mode=hold.
reduceavg, min, max, or median.
modesliding (default) or hold.
mode=slidingReduce over a sliding window on every push; when full, drop the oldest sample.
mode=hold + samplesReduce every N samples; hold the last reduced value between updates.
mode=hold + durationClock-aligned buckets. Emit when the first sample of a new bucket arrives. Failed reads do not shift the phase.
Tip: use sliding when rules should track a smooth live
average; use hold when you want fewer updates (for example a
5-minute mean that only changes when the window completes).