-
Notifications
You must be signed in to change notification settings - Fork 170
/
Copy pathprometheus.yml
169 lines (148 loc) · 3.99 KB
/
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
global:
# How frequently to scrape targets by default.
# Default 15s
scrape_interval: 60s
# How frequently to evaluate rules.
# Default 15s
evaluation_interval: 15s
# How long until a scrape request times out.
# Default to 10s.
# Required because cp-demo is using cpu throttling, so let's leave enough time to fetch the metrics in particular for the first time as it needs to compile all rexps
scrape_timeout: 30s
rule_files:
- "alerts.yml"
- "broker-alerts.yml"
- "connector-alerts.yml"
- "zookeeper-alerts.yml"
alerting:
alertmanagers:
- scheme: http
static_configs:
- targets:
- "alertmanager:9093"
scrape_configs:
- job_name: "prometheus"
static_configs:
- targets: ["localhost:9090"]
- job_name: "node-exporter"
static_configs:
- targets: ["node-exporter:9100"]
relabel_configs:
- source_labels: [__address__]
target_label: hostname
regex: '([^:]+)(:[0-9]+)?'
replacement: '${1}'
- job_name: "zookeeper"
static_configs:
- targets:
- "zookeeper:1234"
labels:
env: "dev"
relabel_configs:
- source_labels: [__address__]
target_label: hostname
regex: '([^:]+)(:[0-9]+)?'
replacement: '${1}'
- job_name: "kafka-broker"
static_configs:
- targets:
- "kafka1:1234"
- "kafka2:1234"
labels:
env: "dev"
relabel_configs:
- source_labels: [__address__]
target_label: hostname
regex: '([^:]+)(:[0-9]+)?'
replacement: '${1}'
- job_name: "schema-registry"
static_configs:
- targets:
- "schemaregistry:1234"
labels:
env: "dev"
relabel_configs:
- source_labels: [__address__]
target_label: hostname
regex: '([^:]+)(:[0-9]+)?'
replacement: '${1}'
- job_name: "kafka-connect"
static_configs:
- targets:
- "connect:1234"
labels:
env: "dev"
kafka_connect_cluster_id: "cluster1"
relabel_configs:
- source_labels: [__address__]
target_label: hostname
regex: '([^:]+)(:[0-9]+)?'
replacement: '${1}'
- job_name: "ksqldb"
static_configs:
- targets:
- "ksqldb-server:1234"
labels:
env: "dev"
relabel_configs:
- source_labels: [__address__]
target_label: hostname
regex: '([^:]+)(:[0-9]+)?'
replacement: '${1}'
- job_name: "streams-demo"
static_configs:
- targets:
- "streams-demo:1234"
labels:
env: "dev"
relabel_configs:
- source_labels: [__address__]
target_label: hostname
regex: '([^:]+)(:[0-9]+)?'
replacement: '${1}'
- job_name: "rest-proxy"
static_configs:
- targets:
- "restproxy:1234"
labels:
env: "dev"
relabel_configs:
- source_labels: [__address__]
target_label: hostname
regex: '([^:]+)(:[0-9]+)?'
replacement: '${1}'
# No producer for the moment in cp-demo
# - job_name: 'kafka-producer'
# static_configs:
# - targets:
# - 'kafka1:1235'
# labels:
# env: 'dev'
# relabel_configs:
# - source_labels: [__address__]
# target_label: hostname
# regex: '([^:]+)(:[0-9]+)?'
# replacement: '${1}'
# No consumer for the moment in cp-demo
# - job_name: 'kafka-consumer'
# static_configs:
# - targets:
# - "kafka1:1236"
# labels:
# env: 'dev'
# relabel_configs:
# - source_labels: [__address__]
# target_label: hostname
# regex: '([^:]+)(:[0-9]+)?'
# replacement: '${1}'
- job_name: "kafka-lag-exporter"
static_configs:
- targets:
- "kafka-lag-exporter:9999"
labels:
env: "dev"
relabel_configs:
- source_labels: [__address__]
target_label: instance
regex: '([^:]+)(:[0-9]+)?'
replacement: '${1}'