Closed michbeck100 closed 1 year ago
Hi Michael, Thx. for the proposal.
I'm not sure what you are trying to achieve?
create database <your_influx_db_name>
create retention policy "oneMonth" on "<your_influx_db_name>" duration 4w replication 1 default
default
, it will be applied to all writes automatically - see here. No need to add it to the write statement.measurement
(eg. SolCast and Mosmix) would use the same policy mentioned in config.ini
I'm working on an update, which will no longer require manual creation of the database. I was not planning to add a retention policy on the automatically created database - but I can certainly be convinced to change my mind there :-)
I use multiple retention policies for different intervals: daily, weekly, monthly, yearly and forever. Default is daily but the data is only retained for 24 hours with an interval of 10 seconds. Then I use multiple continuous queries to copy the data to the different retention policies using appropriate intervals, e.g. for yearly the data is grouped by 30m, so in the end I can keep a lot more data. I couldn’t do this with a 10 second interval.
Thx., Michael - got it - apparently you are storing other data in the same Influx database (because none of the PVForecast data sources updates more often than every 15min). Best practice would probably be to store data in different databases (Influx 2.x has only one retention policy per 'bucket' which is the loose equivalent to 'database' in Influx 1.x)
I'll push your changes as a non-documented feature with next update (and add a retention policy to the database creation). Will take a week and a bit (due to the other changes)
Perfect! Thanks
This has been closed with v2.10 - sorry for the additional delay
This PR adds the option to set a retention policy for influx, default is None. Furthermore are requirements.txt with all dependencies was added.