abalu
March 3, 2025, 11:23pm
1
Hello, Im trying to do a rolling sum over the last hour of my data points. I want this sum to be calculated on every data point. Even once every second would be ok.
But I searched around and apparently the second option is only possible with Flux, which isnt supported in InfluxDb3?
I already raised the question over in the Grafana community, but they recommended to ask here. Since it is mainly a question about the right query that makes probably sense.
I have a rain sensor that sends every 10 minutes the total amount of rain fall it has seen.
I do some calculations and write the amount of rain fall (in mm, which is 1l rain per m²) between the last sensor reading and the current reading in an InfluxDB database.
Now I try to show in a time series panel the amount of falle…
I thought this would be a very common use case.
Since you quoted my post, here is what I came up with in InfluxQL:
SELECT sum("RainCorrDiff") FROM "coop_garden_calc" WHERE ("deviceName"::tag = 'Mitwirkgarten-Barani-MeteoHelix-1') AND $timeFilter GROUP BY time(1d)
This gives me the amount of rain fall per day . If you put GROUP BY time(1h)
it may give you (to be honest I’m not sure) what you want?