问题描述
限时送ChatGPT账号..我有一个 Kakfa 代理正在运行,我正在使用 JMX 对其进行监控.
这个代理是一个 docker 容器,作为一个进程运行,以 kafka-server-start.sh
JMX 端口 9999
作为环境变量公开并用作环境变量.
当我连接到 JMX 端口并尝试列出所有域时,我得到以下信息;
kafkakafka.clusterkafka.controllerkafka.coordinator.groupkafka.coordinator.transaction卡夫卡日志卡夫卡网络卡夫卡服务器kafka.utils
我没有看到 kafka.producer
这是可以理解的,因为这个 Kafka broker 的生产者是 N
个不同的应用程序,但在这一点上我很困惑.>
我如何获得 kafka.producer
指标.我是否必须在作为生产者的每个 N
应用程序中公开 kafka.producer
指标或 是否有一些配置开始收集kafka.producer
仅针对代理的指标.
这样做的正确方法是什么.请帮忙.
解决方案是的,您说得对,要捕获生产者 JMX 指标,您需要在运行 kafka 生产者实例的所有进程中启用 JMX.
I have a Kakfa broker running, which I am monitoring with JMX.
This broker is a docker container running as a process started with kafka-server-start.sh
JMX port 9999
is exposed as and used as an environment variables.
When I connect to the JMX port and try to list all the domains, I get the following;
kafka
kafka.cluster
kafka.controller
kafka.coordinator.group
kafka.coordinator.transaction
kafka.log
kafkawork
kafka.server
kafka.utils
I dont see kafka.producer
which is understandable because the producer for this Kafka broker are N
numbers of different applications, but at this point I am confused.
How do I get the kafka.producer
metrics as well.
Do I have to expose the kafka.producer
metrics in each of N
application that is acting as producer OR is there some configuration that start gathering kafka.producer
metrics on the broker only.
What is the correct way of doing this. Please help.
解决方案Yes you are correct , to capture the producer JMX metrics , you need to enable JMX in all the processes which are running the kafka producer instance.
这篇关于使用 JMX 收集 `kafka.producer` 指标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
更多推荐
[db:关键词]
发布评论