INFLUXDB_DEFAULT_RETENTION - determines how long the data should be stored
before it is dropped, see retention policies for more detail.
Acceptable values are durations and INF for infinite (Default: INF)
INFLUXDB_SHARD_DURATION - determines the size of data shards. An entire shard is dropped once all of the data it contains is out of the retention period. Default values are explained in retention policies and acceptable values are durations
In previous versions, all indexing information for time series has been held in memory. Disadvantage of this solution:
With influxdb 1.7, a new indexing structure has been introduced: TSI: Time Series Index
Advantages of TSI:
monasca is using influxdb 1.8.
New indexing structure will be enabled automatically when installing monasca.
However, existing data won't be migrated automatically.
Thus, there are 2 options for existing data:
We recommend data migration especially if:
The next chapter describes migration to new indexing structure TSI for existing databases.
Background: Shards
Data in influxdb is organized in shards.
In monasca, shards are configured to store 24 hrs of data.
Depending on the defined retention policy (default for monasca: 60d), data will be deleted if they expire.
Only complete shards will be deleted.
The indexing structure is defined for each shard.
If the new indexing structure (TSI) shall be used, shards that existed before ugrade to influxdb 1.8 need to be migrated.
Migration Steps
Please execute the following steps:
docker-compose ... stopdocker start <influx-container-id>docker exec –it \influx-container> /bin/shcd /var/lib influxdbinflux_inspect buildtsi -datadir ./data -waldir ./walinflux_inspect :
docker stop <influx-container-id>docker-compose ... up -ddocker logs <influxdb container id> >& <path for output-file>vi <path for output-file>Content type
Image
Digest
Size
20.3 MB
Last updated
over 5 years ago
docker pull fest/influxdb-init:2.1.0