Update kafka.conf (#9263)

This commit is contained in:
Erikas 2021-05-13 23:36:46 +03:00 committed by GitHub
parent 5330a74fea
commit 760ad3e366
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 57 additions and 3 deletions

View File

@ -1,6 +1,30 @@
[[inputs.jolokia2_agent]]
name_prefix = "kafka_"
## If you intend to use "non_negative_derivative(1s)" with "*.count" fields, you don't need precalculated fields.
# fielddrop = [
# "*.EventType",
# "*.FifteenMinuteRate",
# "*.FiveMinuteRate",
# "*.MeanRate",
# "*.OneMinuteRate",
# "*.RateUnit",
# "*.LatencyUnit",
# "*.50thPercentile",
# "*.75thPercentile",
# "*.95thPercentile",
# "*.98thPercentile",
# "*.99thPercentile",
# "*.999thPercentile",
# "*.Min",
# "*.Mean",
# "*.Max",
# "*.StdDev"
# ]
## jolokia_agent_url tag is not needed if you have only one instance of Kafka on the server.
# tagexclude = ["jolokia_agent_url"]
urls = ["http://localhost:8080/jolokia"]
@ -21,9 +45,15 @@
field_name = "$2"
[[inputs.jolokia2_agent.metric]]
name = "client"
mbean = "kafka.server:client-id=*,type=*"
tag_keys = ["client-id", "type"]
name = "zookeeper"
mbean = "kafka.server:name=*,type=SessionExpireListener"
field_prefix = "$1."
[[inputs.jolokia2_agent.metric]]
name = "user"
mbean = "kafka.server:user=*,type=Request"
field_prefix = ""
tag_keys = ["user"]
[[inputs.jolokia2_agent.metric]]
name = "request"
@ -53,3 +83,27 @@
mbean = "kafka.cluster:name=UnderReplicated,partition=*,topic=*,type=Partition"
field_name = "UnderReplicatedPartitions"
tag_keys = ["topic", "partition"]
## If you have multiple instances of Kafka on the server, use 'jolokia_agent_url' as identity of each instance
# [[processors.rename]]
# namepass = ["kafka_*"]
# order = 1
# [[processors.rename.replace]]
# tag = "jolokia_agent_url"
# dest = "instance"
#
# [[processors.regex]]
# namepass = ["kafka_*"]
# order = 2
# [[processors.regex.tags]]
# key = "instance"
# pattern = "^.+:8080/.+$"
# replacement = "0"
# [[processors.regex.tags]]
# key = "instance"
# pattern = "^.+:8081/.+$"
# replacement = "1"
# [[processors.regex.tags]]
# key = "instance"
# pattern = "^.+:8082/.+$"
# replacement = "2"