Hello Hendrik,
the former. What I do is I have separate dashboards in Grafana for daily (most important), monthly, yearly etc. data. That’s what the timeframe in Grafana is set to, then.
The influx queries then go to the appropriate time range policy.
SELECT last("mean_value") FROM "10m_for_7d"."item" WHERE $timeFilter GROUP BY time($__interval)
Note that the continuous queries iterate over the mean values from the previous retention policy, so for the 24h-data it’s “value”, for the weekly data it’s “mean_value”, monthly is “mean_mean_value” and so on.
I mentioned earlier that openhab doesn’t like underscores in the retention policy names, so I’d avoid them. Too late for me, though, since one can’t rename a retention policy in influxdb.