Influxdb连续查询的时间偏移不起作用

时间:2019-03-29 02:54:17

标签: time offset influxdb

我正在尝试使用时间偏移量进行influxdb连续查询。但是查询不起作用。

这是我的CQ:

CREATE CONTINUOUS QUERY perf_cq_1m ON temp 
BEGIN
     SELECT mean(rate) AS rate INTO temp.autogen.perf_cq_1m FROM 
     temp.autogen.perflog GROUP BY time(1m, 2h) fill(0) 
END

我希望查询向前移动2小时以测试功能。但是子句GROUP BY time(1m, 2h)并没有执行influxDB documentation中演示的内容。

Influx日志显示连续查询在UTC时间范围内执行,与GROUP BY time[1m, 2h]子句无关。日志如下:

2019-03-29T02:40:00.510257Z info Continuous query execution (start) {"log_id": "0ETp9740000", "service": "continuous_querier", "trace_id": "0ETpwX~W000", "op_name": "continuous_querier_execute", "op_event": "start"}
2019-03-29T02:40:00.511279Z info Executing continuous query {"log_id": "0ETp9740000", "service": "continuous_querier", "trace_id": "0ETpwX~W000", "op_name": "continuous_querier_execute", "name": "perf_cq_1m", "db_instance": "temp", "start": "2019-03-29T02:39:00.000000Z", "end": "2019-03-29T02:40:00.000000Z"}
2019-03-29T02:40:00.512286Z info Executing query {"log_id": "0ETp9740000", "service": "query", "query": "SELECT mean(rate) AS rate INTO temp.autogen.perf_cq_1m FROM temp.autogen.perflog WHERE time >= '2019-03-29T02:39:00Z' AND time < '2019-03-29T02:40:00Z' GROUP BY time(1m, 2h) fill(0)"}

本地时间为2019-03-29 10:40:00

就我而言,GROUP BY time(<interval>,<offset>)子句使CQ在where time > '' and time < ''子句中以UTC时间的时间范围在本地时间执行,而不是同时更改执行时间和时间边界。

那么我有什么想念的吗? 任何帮助表示赞赏。

0 个答案:

没有答案