Custom Retention Policy: calculate daily mean and save forever

I have environment measure points. I switched recently from a custom solution to influxdb. I was wondering how I can calculate the avg. on the fly and save them in another data point.

Every minute I get a new data point. This resolution is only required if the data is less than one week old. Which is why, in parallel to the exact resolution, I would like to determine an hourly and a daily one, which I would like to keep longer. The hourly resolution for one month and the daily resolution should never be deleted automatically.

What would be the approach to produce something like this with influxdb?

Hi @Meeresgott,
Welcome to the community and glad to see you are trying out InfluxDB! So what you are looking for is task-based downsampling. Here are the docs: Downsample data in an InfluxDB task | InfluxDB OSS 2.4 Documentation

Thanks @Jay_Clifford! This was exact the function I needed.

1 Like