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.
More on Prometheus Architecture
Describe the Prometheus architecture.BeginnerWhat does a basic prometheus.yml look like?BeginnerWhat is the `up` metric?BeginnerWhat are `job` and `instance` labels and where do they come from?BeginnerHow is the Prometheus TSDB organized on disk?AdvancedWhat is the WAL and why does Prometheus restart slowly sometimes?Advanced