我有一个有效的InfluxDB查询:
select count("cars") from "bridge_activity" where time > now() - 1m group by count
当我在仪表板上将此查询输入Grafana时,没有任何显示。 我一定会缩小到可以看到有问题的时间段。
我要做的是,记录过去一分钟过桥的汽车数量。 我想用它来衡量桥梁的相对活动。
我在Grafana仪表板上做错了什么?
I have an InfluxDB query that works:
select count("cars") from "bridge_activity" where time > now() - 1m group by count
When I enter this query into Grafana on a dashboard, nothing shows up. I've been sure to zoom out enough that the time period in question is visible.
What I'm trying to do is, keep track of the number of cars that have gone over the bridge, over the past minute. I'd like to use this as a measurement of relative activity for the bridge.
What am I doing wrong on the Grafana dashboard?
最满意答案
如果只需要singlestat面板的值,请group by count删除group by count 。
如果您希望绘制随时间变化的汽车数量,则需要SELECT count("cars") from "bridge_activity" GROUP BY time(1m)查询SELECT count("cars") from "bridge_activity" GROUP BY time(1m)
https://docs.influxdata.com/influxdb/v1.0/query_language/data_exploration/#group-by-time-intervals
Remove the group by count if you just want a value for a singlestat panel.
If you're looking to graph the number of cars over time, then you need a query like SELECT count("cars") from "bridge_activity" GROUP BY time(1m)
https://docs.influxdata.com/influxdb/v1.0/query_language/data_exploration/#group-by-time-intervals
更多推荐
发布评论