May 2019
Intermediate to advanced
442 pages
11h 36m
English
Besides the Store API that's exposed by the Thanos sidecar we covered previously, this component is also is able to gather TSDB blocks from disk and ship them to an object storage bucket. This allows you to decrease the retention of the Prometheus server by keeping historical data in a durable medium. In order to use the block upload feature in the sidecar, the --storage.tsdb.min-block-duration and --storage.tsdb.max-block-duration flags need to be set to the same value (two hours to match the default behavior), so that Prometheus local compaction is disabled.
The configuration in use is available on the prometheus instance and can be inspected by executing the following instruction:
vagrant@prometheus:~$ systemctl cat thanos-sidecar ...
Read now
Unlock full access