mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-25 05:34:05 -08:00
parent
d91f724637
commit
7645ed8fd3
|
@ -56,26 +56,27 @@ To federate metrics from one server to another, configure your destination
|
||||||
Prometheus server to scrape from the `/federate` endpoint of a source server,
|
Prometheus server to scrape from the `/federate` endpoint of a source server,
|
||||||
while also enabling the `honor_labels` scrape option (to not overwrite any
|
while also enabling the `honor_labels` scrape option (to not overwrite any
|
||||||
labels exposed by the source server) and passing in the desired `match[]`
|
labels exposed by the source server) and passing in the desired `match[]`
|
||||||
parameters. For example, the following `scrape_config` federates any series
|
parameters. For example, the following `scrape_configs` federates any series
|
||||||
with the label `job="prometheus"` or a metric name starting with `job:` from
|
with the label `job="prometheus"` or a metric name starting with `job:` from
|
||||||
the Prometheus servers at `source-prometheus-{1,2,3}:9090` into the scraping
|
the Prometheus servers at `source-prometheus-{1,2,3}:9090` into the scraping
|
||||||
Prometheus:
|
Prometheus:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- job_name: 'federate'
|
scrape_configs:
|
||||||
scrape_interval: 15s
|
- job_name: 'federate'
|
||||||
|
scrape_interval: 15s
|
||||||
|
|
||||||
honor_labels: true
|
honor_labels: true
|
||||||
metrics_path: '/federate'
|
metrics_path: '/federate'
|
||||||
|
|
||||||
params:
|
params:
|
||||||
'match[]':
|
'match[]':
|
||||||
- '{job="prometheus"}'
|
- '{job="prometheus"}'
|
||||||
- '{__name__=~"job:.*"}'
|
- '{__name__=~"job:.*"}'
|
||||||
|
|
||||||
static_configs:
|
static_configs:
|
||||||
- targets:
|
- targets:
|
||||||
- 'source-prometheus-1:9090'
|
- 'source-prometheus-1:9090'
|
||||||
- 'source-prometheus-2:9090'
|
- 'source-prometheus-2:9090'
|
||||||
- 'source-prometheus-3:9090'
|
- 'source-prometheus-3:9090'
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in a new issue