Configure Thanos sidecar and query layer for global Prometheus view and long-term storage

domain: thanos.io · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Deploy the Thanos sidecar as a container alongside each Prometheus pod; configure it to read Prometheus data from the shared data directory and upload TSDB blocks to an object storage bucket using a storage config secret containing YOUR_KEY
  2. Configure the sidecar's --objstore.config-file to reference a YAML file specifying the object storage type (s3, gcs, azure) and credentials via environment variable references, not inline secrets
  3. Deploy a Thanos Store Gateway pointed at the same object storage bucket; the store gateway serves historical blocks that have been uploaded from sidecars
  4. Deploy Thanos Query, add the sidecar gRPC endpoint addresses and the store gateway address as --store flags; Thanos Query merges results from all stores into a global view
  5. Point Grafana at the Thanos Query HTTP endpoint as a Prometheus data source; queries spanning multiple Prometheus instances are deduplicated using the --query.replica-label flag
  6. Deploy Thanos Compactor (as a single instance, not replicated) to compact and downsample historical blocks in object storage for faster long-range queries

Known gotchas

Related routes

Configure Thanos Receive to accept Prometheus remote-write metrics for long-term storage without sidecars
thanos.io · 6 steps · unrated
Configure Prometheus federation to aggregate metrics from multiple Prometheus servers into a global view
prometheus.io · 6 steps · unrated
Configure the Thanos Compactor to downsample metrics and manage retention in object storage
thanos.io · 6 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans