hassio-addons/addon-influxdb

Ability to specify/override retention policy the HA influxdb component

isorin opened this issue · 3 comments

Problem/Motivation

Reopening of #123

Expected behavior

The ability to specify/override which retention policy the HA influxdb component writes data to.
Retention policies define how long data is stored in a database, each measurement can have data in one or more retention policies.
We need the ability to control in which retention policy data is stored for each individual measurement.
CQ in influxdb always downsamples data and this might not be the desired action for data which doesn't need it.

Actual behavior

HA influxdb component only writes data to the default retention policy for all measurements.

Steps to reproduce

N/A

Proposed changes

A few examples:

component_config_domain:
  climate:
    override_measurement: climate
    override_retention_policy: rp_90days

component_config_glob:
  sensor.*thermostat*:
    override_measurement: thermostat
    override_retention_policy: longterm

Another form, which uses influxdb syntax <retention_policy>.<measurement> could be:

component_config_glob:
  sensor.*thermostat*:
    override_measurement: longterm.thermostat

This is not Home Assistant...

This is not Home Assistant...

Thanks, I will try to open it in the right place.

Some guidance for Home Assistant can be found here: https://www.home-assistant.io/help