Sorry to revive this old thread. I followed the instructions from this and the linked thread and have a question understanding it:
I thought the continuous queries would do the following:
take all data from “autogen” (i have already a database with data in it) which is older than 6 months (for example) and put this in the retention policy 2y_5m with aggregation. So in my understanding, when in look in my influxdb (or with grafana) i would see my entities with stats from before 6 months to 2 years. Since the cq is running continuous i would always have data up to 6 months ago.
But for me, the cq is filling the retention policy with actual data and an actual timestamp (from now), not with the data from past 6 months.
Here are my cq’s:
2y_5m-inf_15min CREATE CONTINUOUS QUERY "2y_5m-inf_15min" ON homeassistant BEGIN SELECT mean(value) AS value, mean(crit) AS crit, mean(warn) AS warn INTO homeassistant.inf_15m.:MEASUREMENT FROM homeassistant."2y_5m"./.*/ WHERE time < now() - 730d GROUP BY time(15m), * END
autogen-2y_5m CREATE CONTINUOUS QUERY "autogen-2y_5m" ON homeassistant BEGIN SELECT mean(value) AS value, mean(crit) AS crit, mean(warn) AS warn INTO homeassistant."2y_5m".:MEASUREMENT FROM homeassistant.autogen./.*/ WHERE time < now() - 26w GROUP BY time(5m), * END
And for me it’s filling not data around 6 Months ago but data from now:
(screenshot from the 2y_5m policy).
Can anyone point me a hint what i’m doing wrong?