MAX_TIME_SERIES
Get 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 & dynamic; the time interval used will change depending on how many points you wish to hold per aggregation key You can change the time interval and/or the number of points per interval to suit your graph.
Syntax
MAX_TIME_SERIES([MAX POINTS, INTERVALS, ]TIME, VALUE)
Arguments
MAX POINTS:
The maximum amount of points to hold before reducing the resolution to the next
interval size (Default Value: 300).
INTERVALS:
An array of integers representing the time interval buckets to return data for.
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
. Default: [60000, 300000, 600000, 1800000, 3600000,
10800000, 21600000, 43200000, 86400000]
TIME:
An expression returning the time value that the VALUE
is to be associated with.
VALUE:
An expression returning the value to aggregate in the provided TIME
bucket.
Returns
An array of key value pairs, the key is the time (in epoch ms) and the value is of type VALUE
and contains the average of the values within that time frame.
Note:
Series are arrays, so MAX_TIME_SERIES
will only appear in the Add Aggregate dialog when the source file is hierarchical. When uploading files, Upsolver's Infer Types checkbox is used to recognize epoch time as a time field. But it only recognizes epoch time in milliseconds.
When uploading files with INFER TYPES - only 13 digit fields are recognized as valid dates 1628894700 is converted to "data.time" 1,628,894,700.
Use Add Calculated Field > TO_DATE
to convert 1,628,894,700,000 to 2021-08-14 01:45:00.
AVAILABLE IN
Output Type Availablity Aggregated Outputs NO Explicit Lookup Table YES Inline Joins\Lookups NO
Example
Data
Query
Collect from server metric events - max cpu over time - in order to display on a graph in a web page:
Results
Related Functions
Dialog
Last updated