Skip to main content
SRE

Thanos

Sidecar

Thanos Sidecar runs alongside Prometheus and uploads TSDB blocks to object storage.

sidecar.yml
# Run alongside Prometheus with access to its data directory.
# The sidecar uploads completed TSDB blocks to object storage and
# exposes a gRPC StoreAPI for the Querier.

thanos sidecar \
  --tsdb.path=/prometheus/data \
  --prometheus.url=http://localhost:9090 \
  --grpc-address=0.0.0.0:10901 \
  --http-address=0.0.0.0:10902 \
  --objstore.config-file=/etc/thanos/bucket.yml

# bucket.yml — GCS example
# type: GCS
# config:
#   bucket: "my-thanos-bucket"

# bucket.yml — S3 example
# type: S3
# config:
#   bucket: "my-thanos-bucket"
#   endpoint: "s3.us-east-1.amazonaws.com"
#   region: "us-east-1"