Skip to main content
SRE

Prometheus

Remote Write

Push metrics to a remote storage backend such as Thanos, Cortex, or Mimir.

remote-write.yml
remote_write:
  # Thanos Receive
  - url: "http://thanos-receive:19291/api/v1/receive"
    queue_config:
      capacity: 2500
      max_shards: 200
      min_shards: 1
      max_samples_per_send: 500
      batch_send_deadline: 5s
      min_backoff: 30ms
      max_backoff: 100ms
    write_relabel_configs:
      # Drop high-cardinality debug metrics before shipping
      - source_labels: [__name__]
        regex: 'go_.*'
        action: drop

  # Grafana Mimir (with basic auth)
  - url: "http://mimir:8080/api/v1/push"
    basic_auth:
      username: "prometheus"
      password: "changeme"
    headers:
      X-Scope-OrgID: "my-tenant"