Hourly rainfall sum

I have a working setup visualising various weather sensors and I now want to display the hourly rain level. The measured millimetres are passed to InfluxDB from my Python code every 5 minutes and I can display it as a continuous line graph but I want InfluxDB to also bar graph the rainfall of every hour, on the hour.
This is my first attempt, does it look like it will do the job? Thanks.

SELECT cumulative_sum(mean("Rain mm")) FROM "Rain" WHERE ("location" = 'Home') AND $timeFilter GROUP BY time(1h) fill(none)

I think I have almost cracked it with this:
SELECT sum("Rain mm") FROM "Rain" WHERE ("location" = 'Home') AND $timeFilter GROUP BY time(1h) fill(linear)
I am trying visualise this together with the 5 minute data plotted as a line but the hourly bars block the view of the line. Is there a way of bringing the line forward so it is seen in front of the bars? I have tried changing colours and adding shading but without success.

1 Like

Hello @peterb,
I’m sorry I’m not much help with Grafana…I don’t use it much. But congrats on figuring out the aggregation!

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.