Aller au contenu

FAQ#

How to rename a S3 bucket ?#

See documentation thanos_s3_bucket_rename

How long can I stop thanos-sidecar (inside prometheus pod) ?#

See thanos_s3_bucket_rename : this doc explains how to do it.

  • Will thanos-sidecar copy the Prometheus blocks to S3 ?

Yes, when thanos-sidecar starts, it will copy all the blocks it can.

  • Will it copy them all ?

Not really : it will only copy the missing blocks. The result is that all the blocks are in S3.

Can I merge the contents of 2 S3 buckets ?#

This has not been tested.

  • Yes we can copy the blocks of one bucket into another

  • But what happens with blocks that overlap ?

  • Will there be a problem with indexes ?

I accidentaly deleted a block in S3. If it is still in Prometheus, can I ask thanos-sidecar to copy it again ?#

  • It will not magically be copied again

  • Can I force it to do it right now ?

Yes.

  • kubectl exec -it prometheus... -c prometheus -- sh
  • vi /prometheus/thanos.shipper.json : remove the bucket ref
  • the block will magically be copied. Check the log : kubectl ... logs prometheus... -c thanos-sidecar (it was immediate in our test)

Why does the list of blocks in /prometheus differ from what I can see in S3 ?#

Last blocks seem to not differ. However, older blocks do.

This has not been formally identified why, but we can think that the compactor would load older blocks and merge similar metrics and compact them, then save the result in a new block in S3. At last, it would remove the original blocks.