You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It adds GROUPBY <label> REDUCE <reducer> to TS.MRANGE/TS.MREVRANGE. It accepts SUM, MIN, MAX reducers and works with unaligned series.
Sample request:
TS.MRANGE 1451679382646 1451682982646 WITHLABELS
AGGREGATION MAX 60000
FILTER measurement=cpu
fieldname=usage_user
hostname=(host_9,host_3,host_5,host_1,host_7,host_2,host_8,host_4)
GROUPBY hostname REDUCE MAX
Reply labels array structure
Labels:
<label>=<groupbyvalue>
__reducer__=<reducer>
__source__=key1,key2,key3
Sample output:
127.0.0.1:6379> ts.add ts1 1 90 labels metric cpu name system
(integer) 1
127.0.0.1:6379> ts.add ts1 2 45 labels metric cpu name system
(integer) 2
127.0.0.1:6379> ts.add ts2 2 99 labels metric cpu name user
(integer) 2
127.0.0.1:6379> ts.add ts3 2 02 labels metric cpu name system
(integer) 2
The following PR RedisTimeSeries/RedisTimeSeries#617 added support for multi-series aggregations to RedisTimeSeries.
It adds
GROUPBY <label> REDUCE <reducer>
toTS.MRANGE/TS.MREVRANGE
. It acceptsSUM
,MIN
,MAX
reducers and works with unaligned series.Sample request:
Reply labels array structure
Labels:
<label>=<groupbyvalue>
__reducer__=<reducer>
__source__=key1,key2,key3
Sample output:
MAX reducer sample output
MIN reducer sample output
The text was updated successfully, but these errors were encountered: