-
-
Notifications
You must be signed in to change notification settings - Fork 26
/
prom-jmx-agent-config.yml
351 lines (331 loc) · 12.1 KB
/
prom-jmx-agent-config.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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
lowercaseOutputName: true
rules:
# Special cases and very specific rules
- pattern: kafka.server<type=(.+), name=(.+), clientId=(.+), topic=(.+), partition=(.*)><>Value
name: kafka_server_$1_$2
type: GAUGE
labels:
clientId: '$3'
topic: '$4'
partition: '$5'
- pattern: kafka.server<type=(.+), name=(.+), clientId=(.+), brokerHost=(.+), brokerPort=(.+)><>Value
name: kafka_server_$1_$2
type: GAUGE
labels:
clientId: '$3'
broker: '$4:$5'
- pattern: kafka.coordinator.(\w+)<type=(.+), name=(.+)><>Value
name: kafka_coordinator_$1_$2_$3
type: GAUGE
# Generic per-second counters with 0-2 key/value pairs
- pattern: kafka.(\w+)<type=(.+), name=(.+)PerSec\w*, (.+)=(.+), (.+)=(.+)><>Count
name: kafka_$1_$2_$3_total
type: COUNTER
labels:
'$4': '$5'
'$6': '$7'
- pattern: kafka.(\w+)<type=(.+), name=(.+)PerSec\w*, (.+)=(.+)><>Count
name: kafka_$1_$2_$3_total
type: COUNTER
labels:
'$4': '$5'
- pattern: kafka.(\w+)<type=(.+), name=(.+)PerSec\w*><>Count
name: kafka_$1_$2_$3_total
type: COUNTER
- pattern: kafka.server<type=(.+), client-id=(.+)><>([a-z-]+)
name: kafka_server_quota_$3
type: GAUGE
labels:
resource: '$1'
clientId: '$2'
- pattern: kafka.server<type=(.+), user=(.+), client-id=(.+)><>([a-z-]+)
name: kafka_server_quota_$4
type: GAUGE
labels:
resource: '$1'
user: '$2'
clientId: '$3'
# Generic gauges with 0-2 key/value pairs
- pattern: kafka.(\w+)<type=(.+), name=(.+), (.+)=(.+), (.+)=(.+)><>Value
name: kafka_$1_$2_$3
type: GAUGE
labels:
'$4': '$5'
'$6': '$7'
- pattern: kafka.(\w+)<type=(.+), name=(.+), (.+)=(.+)><>Value
name: kafka_$1_$2_$3
type: GAUGE
labels:
'$4': '$5'
- pattern: kafka.(\w+)<type=(.+), name=(.+)><>Value
name: kafka_$1_$2_$3
type: GAUGE
# Emulate Prometheus 'Summary' metrics for the exported 'Histogram's.
#
# Note that these are missing the '_sum' metric!
- pattern: kafka.(\w+)<type=(.+), name=(.+), (.+)=(.+), (.+)=(.+)><>Count
name: kafka_$1_$2_$3_count
type: COUNTER
labels:
'$4': '$5'
'$6': '$7'
- pattern: kafka.(\w+)<type=(.+), name=(.+), (.+)=(.*), (.+)=(.+)><>(\d+)thPercentile
name: kafka_$1_$2_$3
type: GAUGE
labels:
'$4': '$5'
'$6': '$7'
quantile: '0.$8'
- pattern: kafka.(\w+)<type=(.+), name=(.+), (.+)=(.+)><>Count
name: kafka_$1_$2_$3_count
type: COUNTER
labels:
'$4': '$5'
- pattern: kafka.(\w+)<type=(.+), name=(.+), (.+)=(.*)><>(\d+)thPercentile
name: kafka_$1_$2_$3
type: GAUGE
labels:
'$4': '$5'
quantile: '0.$6'
- pattern: kafka.(\w+)<type=(.+), name=(.+)><>Count
name: kafka_$1_$2_$3_count
type: COUNTER
- pattern: kafka.(\w+)<type=(.+), name=(.+)><>(\d+)thPercentile
name: kafka_$1_$2_$3
type: GAUGE
labels:
quantile: '0.$4'
- pattern: '"kafka.consumer"<type="(.+)", name="ReplicaFetcherThread-(\d+)-\d+-(\w+)"><>(Count)'
name: kafka_consumer_$1_$3_$4
labels:
thread: $2
- pattern: '"kafka.consumer"<type="(.+)", name="ReplicaFetcherThread-(\d+)-\d+-host_(.+?)-port_(\d+)-(\w+)"><>(Count|Value)'
name: kafka_consumer_$1_$5_$6
labels:
hostport: $3:$4
thread: $2
- name: kafka_consumer_$1_$7_$8
pattern: '"kafka.consumer"<type="(.+)", name="ReplicaFetcherThread-(\d+)-\d+-host_(.+?)-port_(\d+)-(.+)-(\d+)-(\w+)"><>(Count|Value)'
labels:
hostport: $3:$4
partition: $6
thread: $2
topic: $5
- pattern: '"kafka.server"<type="(FetcherStats)", name="ReplicaFetcherThread-(\d+)-\d+-host_(.+?)-port_(\d+)-(\w+)PerSec"><>Count'
name: kafka_server_$1_$5_total
labels:
hostport: $3:$4
thread: $2
- pattern: '"kafka.server"<type="(FetcherLag.+)", name="ReplicaFetcherThread-(\d+)-\d+-host_(.+?)-port_(\d+)-(.+)-(\d+)-(\w+)"><>(Count|Value)'
name: kafka_server_$1_$7_$8
labels:
hostport: $3:$4
partition: $6
thread: $2
topic: $5
- name: kafka_cluster_$1_$4
pattern: '"kafka.cluster"<type="(.+)", name="(.+)-(\d+)-(\w+)"><>Value'
labels:
partition: $3
topic: $2
- pattern: '"kafka.log"<type="Log", name="(.+)-(\d+)-(\w+)"><>Value'
name: kafka_log_$3
labels:
partition: $2
topic: $1
- pattern: '"kafka.server"<type="(.+)", name="(.+)-(\w+)PerSec"><>Count'
name: kafka_server_$1_$3_total
labels:
topic: $2
type: COUNTER
- pattern: '"kafka.server"<type="(.+)", name="(.+)-(\w+)"><>(Count|Value)'
name: kafka_server_$1_$3_$4
labels:
topic: $2
- pattern: '"kafka.network"<type="(.+)", name="Processor-(\d+)-(.+)"><>Value'
name: kafka_network_$1_$3
labels:
processor: $2
- pattern: '"kafka.(\w+)"<type="(.+)", name="(.+)PerSec"><>Count'
name: kafka_$1_$2_$3_total
type: COUNTER
- pattern: '"kafka.(\w+)"<type="(.+)", name="(.+)"><>(Count|Value)'
name: kafka_$1_$2_$3_$4
#kafka.connect:type=app-info,client-id="{clientid}"
#kafka.consumer:type=app-info,client-id="{clientid}"
#kafka.producer:type=app-info,client-id="{clientid}"
- pattern: 'kafka.(.+)<type=app-info, client-id=(.+)><>start-time-ms'
name: kafka_$1_start_time_seconds
labels:
clientId: '$2'
help: 'Kafka $1 JMX metric start time seconds'
type: GAUGE
valueFactor: 0.001
- pattern: 'kafka.(.+)<type=app-info, client-id=(.+)><>(commit-id|version): (.+)'
name: kafka_$1_$3_info
value: 1
labels:
clientId: '$2'
$3: '$4'
help: 'Kafka $1 JMX metric info version and commit-id'
type: GAUGE
#kafka.producer:type=producer-topic-metrics,client-id="{clientid}",topic="{topic}"", partition="{partition}"
#kafka.consumer:type=consumer-fetch-manager-metrics,client-id="{clientid}",topic="{topic}"", partition="{partition}"
- pattern: kafka.(.+)<type=(.+)-metrics, client-id=(.+), topic=(.+), partition=(.+)><>(.+-total|compression-rate|.+-avg|.+-replica|.+-lag|.+-lead)
name: kafka_$2_$6
labels:
clientId: '$3'
topic: '$4'
partition: '$5'
help: 'Kafka $1 JMX metric type $2'
type: GAUGE
#kafka.producer:type=producer-topic-metrics,client-id="{clientid}",topic="{topic}"
#kafka.consumer:type=consumer-fetch-manager-metrics,client-id="{clientid}",topic="{topic}"", partition="{partition}"
- pattern: kafka.(.+)<type=(.+)-metrics, client-id=(.+), topic=(.+)><>(.+-total|compression-rate|.+-avg)
name: kafka_$2_$5
labels:
clientId: '$3'
topic: '$4'
help: 'Kafka $1 JMX metric type $2'
type: GAUGE
# #kafka.connect:type=connect-node-metrics,client-id="{clientid}",node-id="{nodeid}"
# #kafka.consumer:type=consumer-node-metrics,client-id=consumer-1,node-id="{nodeid}"
# - pattern: kafka.(.+)<type=(.+)-metrics, client-id=(.+), node-id=(.+)><>(.+-total|.+-avg)
# name: kafka_$2_$5
# labels:
# clientId: '$3'
# nodeId: '$4'
# help: 'Kafka $1 JMX metric type $2'
# type: UNTYPED
#kafka.connect:type=kafka-metrics-count,client-id="{clientid}"
#kafka.consumer:type=consumer-fetch-manager-metrics,client-id="{clientid}"
#kafka.consumer:type=consumer-coordinator-metrics,client-id="{clientid}"
#kafka.consumer:type=consumer-metrics,client-id="{clientid}"
- pattern: kafka.(.+)<type=(.+)-metrics, client-id=(.*)><>(.+-total|.+-avg|.+-bytes|.+-count|.+-ratio|.+-age|.+-flight|.+-threads|.+-connectors|.+-tasks|.+-ago)
name: kafka_$2_$4
labels:
clientId: '$3'
help: 'Kafka $1 JMX metric type $2'
type: GAUGE
#kafka.connect:type=connector-task-metrics,connector="{connector}",task="{task}<> status"
- pattern: 'kafka.connect<type=connector-task-metrics, connector=(.+), task=(.+)><>status: ([a-z-]+)'
name: kafka_connect_connector_status
value: 1
labels:
connector: '$1'
task: '$2'
status: '$3'
help: 'Kafka Connect JMX Connector status'
type: GAUGE
#kafka.connect:type=task-error-metrics,connector="{connector}",task="{task}"
#kafka.connect:type=source-task-metrics,connector="{connector}",task="{task}"
#kafka.connect:type=sink-task-metrics,connector="{connector}",task="{task}"
#kafka.connect:type=connector-task-metrics,connector="{connector}",task="{task}"
- pattern: kafka.connect<type=(.+)-metrics, connector=(.+), task=(.+)><>(.+-total|.+-count|.+-ms|.+-ratio|.+-avg|.+-failures|.+-requests|.+-timestamp|.+-logged|.+-errors|.+-retries|.+-skipped)
name: kafka_connect_$1_$4
labels:
connector: '$2'
task: '$3'
help: 'Kafka Connect JMX metric type $1'
type: GAUGE
#kafka.connect:type=connector-metrics,connector="{connector}"
#kafka.connect:type=connect-worker-metrics,connector="{connector}"
- pattern: kafka.connect<type=connect-worker-metrics, connector=(.+)><>([a-z-]+)
name: kafka_connect_worker_$2
labels:
connector: '$1'
help: 'Kafka Connect JMX metric $1'
type: GAUGE
#kafka.connect:type=connect-worker-metrics
- pattern: kafka.connect<type=connect-worker-metrics><>([a-z-]+)
name: kafka_connect_worker_$1
help: 'Kafka Connect JMX metric worker'
type: GAUGE
#kafka.connect:type=connect-worker-rebalance-metrics
- pattern: kafka.connect<type=connect-worker-rebalance-metrics><>([a-z-]+)
name: kafka_connect_worker_rebalance_$1
help: 'Kafka Connect JMX metric rebalance information'
type: GAUGE
- pattern: kafka.cluster<type=(.+), name=(.+), topic=(.+), partition=(.+)><>Value
name: kafka_cluster_$1_$2
labels:
topic: '$3'
partition: '$4'
- pattern: kafka.log<type=Log, name=(.+), topic=(.+), partition=(.+)><>Value
name: kafka_log_$1
labels:
topic: '$2'
partition: '$3'
- pattern: kafka.controller<type=(.+), name=(.+)><>(Count|Value)
name: kafka_controller_$1_$2
- pattern: kafka.network<type=(.+), name=(.+)><>Value
name: kafka_network_$1_$2
- pattern: kafka.network<type=(.+), name=(.+)PerSec, request=(.+)><>Count
name: kafka_network_$1_$2_total
labels:
request: '$3'
- pattern: kafka.network<type=(.+), name=(\w+), networkProcessor=(.+)><>Count
name: kafka_network_$1_$2
labels:
request: '$3'
type: COUNTER
- pattern: kafka.network<type=(.+), name=(\w+), request=(\w+)><>Count
name: kafka_network_$1_$2
labels:
request: '$3'
- pattern: kafka.network<type=(.+), name=(\w+)><>Count
name: kafka_network_$1_$2
- pattern: kafka.server<type=(.+), name=(.+)PerSec\w*, topic=(.+)><>Count
name: kafka_server_$1_$2_total
labels:
topic: '$3'
- pattern: kafka.server<type=(.+), name=(.+)PerSec\w*><>Count
name: kafka_server_$1_$2_total
type: COUNTER
- pattern: kafka.server<type=(.+), name=(.+), clientId=(.+), topic=(.+), partition=(.*)><>(Count|Value)
name: kafka_server_$1_$2
labels:
clientId: '$3'
topic: '$4'
partition: '$5'
- pattern: kafka.server<type=(.+), name=(.+), topic=(.+), partition=(.*)><>(Count|Value)
name: kafka_server_$1_$2
labels:
topic: '$3'
partition: '$4'
- pattern: kafka.server<type=(.+), name=(.+), topic=(.+)><>(Count|Value)
name: kafka_server_$1_$2
labels:
topic: '$3'
type: COUNTER
- pattern: kafka.server<type=(.+), name=(.+), clientId=(.+), brokerHost=(.+), brokerPort=(.+)><>(Count|Value)
name: kafka_server_$1_$2
labels:
clientId: '$3'
broker: '$4:$5'
- pattern: kafka.server<type=(.+), name=(.+), clientId=(.+)><>(Count|Value)
name: kafka_server_$1_$2
labels:
clientId: '$3'
- pattern: kafka.server<type=(.+), name=(.+)><>(Count|Value)
name: kafka_server_$1_$2
- pattern: kafka.(\w+)<type=(.+), name=(.+)PerSec\w*><>Count
name: kafka_$1_$2_$3_total
- pattern: kafka.(\w+)<type=(.+), name=(.+)PerSec\w*, topic=(.+)><>Count
name: kafka_$1_$2_$3_total
labels:
topic: '$4'
type: COUNTER
- pattern: kafka.(\w+)<type=(.+), name=(.+)PerSec\w*, topic=(.+), partition=(.+)><>Count
name: kafka_$1_$2_$3_total
labels:
topic: '$4'
partition: '$5'
type: COUNTER
- pattern: kafka.(\w+)<type=(.+), name=(.+)><>(Count|Value)
name: kafka_$1_$2_$3_$4
type: COUNTER
- pattern: kafka.(\w+)<type=(.+), name=(.+), (\w+)=(.+)><>(Count|Value)
name: kafka_$1_$2_$3_$6
labels:
'$4': '$5'