From b4be40871c6343f8a6bdfae8b0a7bac5f6980028 Mon Sep 17 00:00:00 2001 From: Kazuhiro MUSASHI Date: Sat, 18 Jul 2020 20:22:56 +0900 Subject: [PATCH] Add federation settings. --- .../files/etc/prometheus.d/prometheus.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/cookbooks/prometheus/files/etc/prometheus.d/prometheus.yml b/cookbooks/prometheus/files/etc/prometheus.d/prometheus.yml index c28fc68..b4d04a8 100644 --- a/cookbooks/prometheus/files/etc/prometheus.d/prometheus.yml +++ b/cookbooks/prometheus/files/etc/prometheus.d/prometheus.yml @@ -20,6 +20,21 @@ rule_files: # Here it's Prometheus itself. scrape_configs: # The job name is added as a label `job=` to any timeseries scraped from this config. + - job_name: 'federate' + scrape_interval: 15s + + honor_labels: true + metrics_path: '/federate' + + params: + 'match[]': + - '{job="prometheus"}' + - '{__name__=~"job:.*"}' + + static_configs: + - targets: + - '192.168.10.204:9090' + - job_name: 'prometheus' # metrics_path defaults to '/metrics'