tsbs
tsbs copied to clipboard
groupby-orderby-limit query incorrect on influxdb
The description of this query is:
The last 5 aggregate readings (across time) before a randomly chosen endpoint
but the query produced for influx looks like:
SELECT max(usage_user) from cpu WHERE time < '2016-01-01T14:37:05Z' group by time(1m) limit 5
this is missing the appropriate ORDER BY clause to get the last five readings.. Instead it seems to pick up the first five minutes of the dataset.