我正在使用 Derivative 函数来计算带宽并通过 kapacitor 发送警报,
下面是查询
|query(''' SELECT derivative(mean("bandwidth_in"), 1s) *8 as "value" FROM "router"."autogen"."cisco_router" where host = '10.1.11.1' and ( interface_name = 'XXX' or interface_name = 'XXXXX')) AND time < now() GROUP BY time(1s) ''')
.cluster('network')
.period(7m)
.every(6m)
.groupBy(time(10s), *)
当我尝试将这个刻度脚本保存在 chronograf 中时,我得到以下错误。
无法解析 InfluxQL 查询:衍生聚合需要 GROUP BY 间隔