Delete all InfluxDB measurements except for the most recent for an openHAB item

That’s true, but in many cases you can use the continuous query to move from one retention policy to another after it is collected. For example, I gather temperature data as it changes, and it goes into the 1 month retention policy. Then I use a continuous query to get the min/max daily and store those forever.

Also, you don’t have to use the persistence to store the data to InfluxDB. It is possible to POST directly from a rule. In that case you have control over the retention policy.

There’s some work on a new InfluxDB persistence binding here that mentions retention policy specification.

1 Like