使用JMX收集`kafka.producer`指标 [英] Gathering `kafka.producer` metrics using JMX

查看:167
本文介绍了使用JMX收集`kafka.producer`指标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个正在运行的Kakfa代理,正在使用JMX进行监视.

I have a Kakfa broker running, which I am monitoring with JMX.

此代理是一个以kafka-server-start.sh JMX端口9999开头的进程运行的docker容器,并作为环境变量使用.

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.

当我连接到JMX端口并尝试列出所有域时,我得到以下信息;

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
kafka.network
kafka.server
kafka.utils

我看不到kafka.producer这是可以理解的,因为该Kafka经纪人的生产者是不同应用程序的N数量,但在这一点上我感到困惑.

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.

如何获取kafka.producer指标. 我是否必须在充当生产者 OR 的每个N应用程序中公开kafka.producer指标,是否有一些配置仅开始在代理上收集kafka.producer指标.

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.

推荐答案

是的,要捕获生产者JMX指标,您需要在运行kafka生产者实例的所有进程中启用JMX.

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆