Prometheus联邦

目录


Prometheus联邦

prometheus.yml示例:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
global:
scrape_interval: 15s
scrape_timeout: 10s
evaluation_interval: 1m
alerting:
alertmanagers:
- static_configs:
- targets:
- x.xx.xxx.xxx:9093
scheme: http
timeout: 10s
rule_files:
- /etc/prometheus/rules/*.yml

scrape_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
0%