MAX_TIME_SERIES
Returns the maximum value per time interval. This aggregation is useful for collecting time-series data for graphs.
The size of the time intervals is configurable and dynamic; the time interval used changes depending on how many points you wish to hold per aggregation key.
The time interval and/or the number of points per interval can be changed to suit your needs.
Syntax
MAX_TIME_SERIES([MAX_POINTS, INTERVALS,] TIME, VALUE)Arguments
MAX_POINTS
MAX_POINTSType: integer
Default: 300
(Optional) The maximum amount of points to hold before reducing the resolution to the next interval size.
INTERVALS
INTERVALSType: array
Default: [60000, 300000, 600000, 1800000, 3600000, 10800000, 21600000, 43200000, 86400000]
(Optional) Array of integers representing the time interval buckets in epoch ms for which to return data.
If the aggregation has more than MAX_POINTS values in the given window, it will use the next interval from this array to reduce the amount of points to comply with MAX_POINTS.
TIME
TIMEType: numeric
The field with the time in epoch ms that VALUE is associated with.
VALUE
VALUEType: any
The field to get the maximum value of per TIME bucket.
Returns
Type: array
Returns an array of key-value pairs where the key is the time (in epoch ms) and the value is the maximum VALUE from within that time frame.
Last updated
