Skip to content

Commit

Permalink
docs: clarify retention (#4279)
Browse files Browse the repository at this point in the history
* clearify retention

Signed-off-by: Dominik Hasselkuss <[email protected]>

* Update docs/components/sidecar.md

Co-authored-by: Prem Saraswat <[email protected]>
Signed-off-by: Dominik Hasselkuss <[email protected]>

* clearify readme for retention

Signed-off-by: Dominik Hasselkuss <[email protected]>

Co-authored-by: Prem Saraswat <[email protected]>
  • Loading branch information
Domi-cc and onprem authored Jun 3, 2021
1 parent e982ff8 commit f9f2d1c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/components/sidecar.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ If you choose to use the sidecar to also upload data to object storage:
* It only uploads uncompacted Prometheus blocks. For compacted blocks, see [Upload compacted blocks](./sidecar.md/#upload-compacted-blocks).
* The `--storage.tsdb.min-block-duration` and `--storage.tsdb.max-block-duration` must be set to equal values to disable local compaction on order to use Thanos sidecar upload, otherwise leave local compaction on if sidecar just exposes StoreAPI and your retention is normal. The default of `2h` is recommended.
Mentioned parameters set to equal values disable the internal Prometheus compaction, which is needed to avoid the uploaded data corruption when Thanos compactor does its job, this is critical for data consistency and should not be ignored if you plan to use Thanos compactor. Even though you set mentioned parameters equal, you might observe Prometheus internal metric `prometheus_tsdb_compactions_total` being incremented, don't be confused by that: Prometheus writes initial head block to filesystem via its internal compaction mechanism, but if you have followed recommendations - data won't be modified by Prometheus before the sidecar uploads it. Thanos sidecar will also check sanity of the flags set to Prometheus on the startup and log errors or warning if they have been configured improperly (#838).
* The retention is recommended to not be lower than three times the min block duration, so 6 hours. This achieves resilience in the face of connectivity issues to the object storage since all local data will remain available within the Thanos cluster. If connectivity gets restored the backlog of blocks gets uploaded to the object storage.
* The retention of Prometheus is recommended to not be lower than three times of the min block duration, so 6 hours. This achieves resilience in the face of connectivity issues to the object storage since all local data will remain available within the Thanos cluster. If connectivity gets restored the backlog of blocks gets uploaded to the object storage.

## Reloader Configuration

Expand Down

0 comments on commit f9f2d1c

Please sign in to comment.