我创建了以下Grafana仪表板:
SELECT sum("value") FROM "rails.pageviews"
WHERE $timeFilter
GROUP BY time($__interval) fill(null)
图形面板使用完全相同的查询:
SELECT sum("value") FROM "rails.pageviews"
WHERE $timeFilter
GROUP BY time($__interval) fill(null)
如何使单一状态面板显示总的浏览量?应该是12(8 + 2 + 2),而不是4,对吧?
当我调试从Influxdb返回的数据时:
response:Object
results:Array[1]
0:Object
statement_id:0
series:Array[1]
0:Object
name:"rails.pageviews"
columns:Array[2]
0:"time"
1:"sum"
values:Array[73]
0:Array[1530870900000,null]
(...)
37:Array[1530882000000,null]
38:Array[1530882300000,8]
39:Array[1530882600000,null]
(...)
44:Array[1530884100000,null]
45:Array[1530884400000,2]
46:Array[1530884700000,null]
(...)
53:Array[1530886800000,null]
54:Array[1530887100000,2]
55:Array[1530887400000,null]
(...)
72:Array[1530892500000,null]