Hi.
I have an InfluxDB table which receives one new value inserted every second. The value is always either 0 or 1.
Therefore adding up an arbitrary number of these values should always produce either 0 or a positive integer.
I’ve set up a query in Grafana to tell me the sum of these values over the past hour. Grafana’s query inspector shows me that it is doing:
q:“SELECT sum(“currentcalls”) FROM “mqtt_consumer” WHERE (“topic” = ‘PBX/Live’) AND time >= now() - 1h GROUP BY time(1h) fill(null)”
So, how is it possible for Grafana to tell me that the sum of these 3600 integer values is 1.3?
Thanks for any insight, or any pointers to where I’ve set up the query wrongly.
I’ve asked this on the Grafana list, and the response I got was “InfluxDB is doing all the calculations here”, which seems reasonable, therefore I’m asking here…
Antony.