Decreasing Influxdb size by removing measurements

I use Influxdb as long term measurement storage. When I started using Influxdb, I did not take actions on choosing which measurements to store in Influxdb. I don’t want to use retention policy on the measurements of interest (i.e. temperatures and humidity of my house) but store the measurements indefinitely. However, I would like to get rid of non-interesting measurements, like battery level of sensors etc.

How do I delete specific values from database such way that the disk usage of Influxdb is reduced?

1 Like

I bump this…
Even though I started with quite strict rules for what to save, data base size grow pretty fast.
It would be very nice with a GUI function to just drop entities that are not interested any more.

Another function that would be highly appreciated is a more customable data retention policy…via GUI for us beginners…
I read about someone who managed to create some data retention policies to drop excessive old data (but I never understood if the description was for a “normal” installation of Home Assistant on a Pi/NUC etc or if it was some container installation).
However, what he described was:
Data from current to X month: Keep as is
Data from X month to Y month: Save one data point per 5 min
Data from Y month to eternity: Save one data point per 15 min
Something like this would be brilliant to be able to configure in an easy manner - preferably via the InfluxDB add-on GUI, or if someone could write a very clear description of how to configure.
Preferably with X and Y month configurable as well as number of data points per minute per interval.

1 Like

I have not tried this yet but it is on my list of things to do. Here are some links you may find useful: