What is federation in Prometheus?

IntermediateConceptPrometheus Architecture
Answer

A Prometheus server scrapes the /federate endpoint of other Prometheus servers, selecting series with match[]:

- job_name: federate
  honor_labels: true
  metrics_path: /federate
  params:
    "match[]": ['{__name__=~"job:.*"}']
  static_configs:
    - targets: ["prom-eu:9090", "prom-us:9090"]

It is meant for pulling aggregated recording-rule results upward, not for copying everything. For a full global view and long retention we use Thanos or Mimir instead.

All Monitoring & Observability questions Roadmap: Monitoring & alerting

More on Prometheus Architecture