-
Notifications
You must be signed in to change notification settings - Fork 170
/
Copy pathkafka_broker_p99only.yml
237 lines (233 loc) · 8.1 KB
/
kafka_broker_p99only.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
---
startDelaySeconds: 120
lowercaseOutputName: true
lowercaseOutputLabelNames: true
blacklistObjectNames:
- "kafka.consumer:type=*,id=*"
- "kafka.consumer:type=*,client-id=*"
- "kafka.consumer:type=*,client-id=*,node-id=*"
- "kafka.producer:type=*,id=*"
- "kafka.producer:type=*,client-id=*"
- "kafka.producer:type=*,client-id=*,node-id=*"
- "kafka.*:type=kafka-metrics-count,*"
# This will ignore the admin client metrics from Kafka Brokers and will blacklist certain metrics
# that do not make sense for ingestion.
# "kafka.admin.client:type=*, node-id=*, client-id=*"
# "kafka.admin.client:type=*, client-id=*"
# "kafka.admin.client:type=*, id=*"
- "kafka.admin.client:*"
- "kafka.server:type=*,cipher=*,protocol=*,listener=*,networkProcessor=*"
- "kafka.server:type=*"
rules:
# This rule is more specific than the next rule; it has to come before it otherwise it will never be hit
# "kafka.server:type=*,name=*, client-id=*, topic=*, partition=*"
- pattern: kafka.server<type=(.+), name=(.+), clientId=(.+), topic=(.+), partition=(.*)><>Value
name: kafka_server_$1_$2
type: GAUGE
cache: true
labels:
clientId: "$3"
topic: "$4"
partition: "$5"
# This is by far the biggest contributor to the number of sheer metrics being produced.
# Always keep it near the top for the case of probability when so many metrics will hit the first condition and exit.
# "kafka.cluster:type=*, name=*, topic=*, partition=*"
# "kafka.log:type=*,name=*, topic=*, partition=*"
- pattern: kafka.(\w+)<type=(.+), name=(.+), topic=(.+), partition=(.+)><>Value
name: kafka_$1_$2_$3
type: GAUGE
cache: true
labels:
topic: "$4"
partition: "$5"
# Next two rules are similar; Value version is a GAUGE; Count version is not
- pattern: kafka.server<type=(.+), name=(.+), clientId=(.+), brokerHost=(.+), brokerPort=(.+)><>Value
name: kafka_server_$1_$2
type: GAUGE
cache: true
labels:
clientId: "$3"
broker: "$4:$5"
- pattern: kafka.server<type=(.+), name=(.+), clientId=(.+), brokerHost=(.+), brokerPort=(.+)><>Count
name: kafka_server_$1_$2
cache: true
labels:
clientId: "$3"
broker: "$4:$5"
# Needed for Cluster Linking metrics
# "kafka.server:type=*, name=*, *=*, *=*, *=*, *=*"
- pattern: kafka.(\w+)<type=(.+), name=(.+), (.+)=(.+), (.+)=(.+), (.+)=(.+), (.+)=(.+)><>(Count|Value)
name: kafka_$1_$2_$3
cache: true
labels:
"$4": "$5"
"$6": "$7"
"$8": "$9"
"$10": "$11"
# "kafka.server:type=*, name=*, *=*, *=*, *=*"
- pattern: kafka.(\w+)<type=(.+), name=(.+), (.+)=(.+), (.+)=(.+), (.+)=(.+)><>(Count|Value)
name: kafka_$1_$2_$3
cache: true
labels:
"$4": "$5"
"$6": "$7"
"$8": "$9"
# "kafka.network:type=*, name=*, request=*, error=*"
# "kafka.network:type=*, name=*, request=*, version=*"
- pattern: kafka.(\w+)<type=(.+), name=(.+), (.+)=(.+), (.+)=(.+)><>(Count|Value)
name: kafka_$1_$2_$3
cache: true
labels:
"$4": "$5"
"$6": "$7"
- pattern: kafka.(\w+)<type=(.+), name=(.+), (.+)=(.*), (.+)=(.+)><>99thPercentile
name: kafka_$1_$2_$3
type: GAUGE
cache: true
labels:
"$4": "$5"
"$6": "$7"
quantile: "0.99"
# "kafka.rest:type=*, topic=*, partition=*, client-id=*"
# "kafka.rest:type=*, cipher=*, protocol=*, client-id=*"
- pattern: kafka.(\w+)<type=(.+), (.+)=(.+), (.+)=(.+), (.+)=(.+)><>Value
name: kafka_$1_$2
cache: true
labels:
"$3": "$4"
"$5": "$6"
"$7": "$8"
# Count and Value
# "kafka.server:type=*, name=*, topic=*"
# "kafka.server:type=*, name=*, clientId=*"
# "kafka.server:type=*, name=*, delayedOperation=*"
# "kafka.server:type=*, name=*, fetcherType=*"
# "kafka.network:type=*, name=*, networkProcessor=*"
# "kafka.network:type=*, name=*, processor=*"
# "kafka.network:type=*, name=*, request=*"
# "kafka.network:type=*, name=*, listener=*"
# "kafka.log:type=*, name=*, logDirectory=*"
# "kafka.log:type=*, name=*, op=*"
# "kafka.rest:type=*, node-id=*, client-id=*"
- pattern: kafka.(\w+)<type=(.+), name=(.+), (.+)=(.+)><>(Count|Value)
name: kafka_$1_$2_$3
cache: true
labels:
"$4": "$5"
# "kafka.consumer:type=*, topic=*, client-id=*"
# "kafka.producer:type=*, topic=*, client-id=*"
# "kafka.rest:type=*, topic=*, client-id=*"
# "kafka.server:type=*, broker-id=*, fetcher-id=*"
# "kafka.server:type=*, listener=*, networkProcessor=*"
- pattern: kafka.(\w+)<type=(.+), (.+)=(.+), (.+)=(.+)><>(Count|Value)
name: kafka_$1_$2
cache: true
labels:
"$3": "$4"
"$5": "$6"
# "kafka.network:type=*, name=*"
# "kafka.server:type=*, name=*"
# "kafka.controller:type=*, name=*"
# "kafka.databalancer:type=*, name=*"
# "kafka.log:type=*, name=*"
# "kafka.utils:type=*, name=*"
- pattern: kafka.(\w+)<type=(.+), name=(.+)><>(Count|Value)
name: kafka_$1_$2_$3
# "kafka.producer:type=*, client-id=*"
# "kafka.producer:type=*, id=*"
# "kafka.rest:type=*, client-id=*"
# "kafka.rest:type=*, http-status-code=*"
# "kafka.server:type=*, BrokerId=*"
# "kafka.server:type=*, listener=*"
# "kafka.server:type=*, id=*"
- pattern: kafka.(\w+)<type=(.+), (.+)=(.+)><>Value
name: kafka_$1_$2
cache: true
labels:
"$3": "$4"
- pattern: kafka.server<type=KafkaRequestHandlerPool, name=RequestHandlerAvgIdlePercent><>OneMinuteRate
name: kafka_server_kafkarequesthandlerpool_requesthandleravgidlepercent_total
type: GAUGE
# "kafka.server:type=*, listener=*, networkProcessor=*, clientSoftwareName=*, clientSoftwareVersion=*"
- pattern: kafka.server<type=socket-server-metrics, clientSoftwareName=(.+), clientSoftwareVersion=(.+), listener=(.+), networkProcessor=(.+)><>connections
name: kafka_server_socketservermetrics_connections
type: GAUGE
cache: true
labels:
client_software_name: "$1"
client_software_version: "$2"
listener: "$3"
network_processor: "$4"
- pattern: "kafka.server<type=socket-server-metrics, listener=(.+), networkProcessor=(.+)><>(.+):"
name: kafka_server_socketservermetrics_$3
type: GAUGE
cache: true
labels:
listener: "$1"
network_processor: "$2"
# "kafka.coordinator.group:type=*, name=*"
# "kafka.coordinator.transaction:type=*, name=*"
- pattern: kafka.coordinator.(\w+)<type=(.+), name=(.+)><>(Count|Value)
name: kafka_coordinator_$1_$2_$3
# Percentile
- pattern: kafka.(\w+)<type=(.+), name=(.+), (.+)=(.*)><>99thPercentile
name: kafka_$1_$2_$3
type: GAUGE
cache: true
labels:
"$4": "$5"
quantile: "0.99"
- pattern: kafka.(\w+)<type=(.+), name=(.+)><>99thPercentile
name: kafka_$1_$2_$3
type: GAUGE
cache: true
labels:
quantile: "0.99"
# Additional Rules for Confluent Server Metrics
# 'confluent.metadata:type=*, name=*, topic=*, partition=*'
- pattern: confluent.(\w+)<type=(.+), (.+)=(.+), (.+)=(.+), (.+)=(.+)><>Value
name: confluent_$1_$2
type: GAUGE
cache: true
labels:
"$3": "$4"
"$5": "$6"
"$7": "$8"
# 'confluent.metadata.service:type=*, node-id=*, client-id=*'
- pattern: confluent.(.+)<type=(.+), (.+)=(.+), (.+)=(.+)><>Value
name: confluent_$1_$2
type: GAUGE
cache: true
labels:
"$3": "$4"
"$5": "$6"
# 'confluent.metadata.service:type=*, client-id=*'
# 'confluent.metadata.service:type=*, id=*'
# 'confluent.metadata:type=*, name=*'
# 'confluent.license:type=*, name=*'
- pattern: confluent.(.+)<type=(.+), (.+)=(.+)><>Value
name: confluent_$1_$2
type: GAUGE
cache: true
labels:
"$3": "$4"
# Quotas
- pattern : 'kafka.server<type=(Produce|Fetch|Request), user=(.+), client-id=(.+)><>(.+):'
name: kafka_server_$1_$4
type: GAUGE
cache: true
labels:
user: "$2"
client-id: "$3"
- pattern : 'kafka.server<type=(Produce|Fetch|Request), user=(.+)><>(.+):'
name: kafka_server_$1_$3
type: GAUGE
cache: true
labels:
user: "$2"
- pattern : 'kafka.server<type=(Produce|Fetch|Request), client-id=(.+)><>(.+):'
name: kafka_server_$1_$3
type: GAUGE
cache: true
labels:
client-id: "$2"