Prometheus联邦 Posted on 2019-03-17 | In 监控 目录 × 文章目录 Prometheus联邦 prometheus.yml示例: 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354global: scrape_interval: 15s scrape_timeout: 10s evaluation_interval: 1malerting: alertmanagers: - static_configs: - targets: - x.xx.xxx.xxx:9093 scheme: http timeout: 10srule_files:- /etc/prometheus/rules/*.ymlscrape_configs:- job_name: federate honor_labels: true params: match[]: - '{job=~"\\w.*"}' #- '{job=~"[a-zA-Z_].*"}' metrics_path: /federate scheme: http static_configs: - targets: - x.xx.xxx.xxx:9090 - job_name: federate2 honor_labels: true params: match[]: - '{job=~"\\w.*"}' scrape_interval: 30s scrape_timeout: 30s metrics_path: /federate scheme: http static_configs: - targets: - x.xx.xxx.xxx:xxxx- job_name: federate_pmm_server scrape_interval: 30s scrape_timeout: 30s honor_labels: true metrics_path: /prometheus/federate basic_auth: username: "xxx" password: "xxx" params: match[]: - '{job=~"\\w.*"}' static_configs: - targets: - x.xx.xxx.xxx:xxxx