如何在命令行上监视Kafka代理的JMX指标? [英] How to monitor JMX metrics of Kafka broker on command line?
问题描述
可以通过其公开的JMX指标详细监控Kafka集群.通常,需要将外部GUI或类似jconsole
的应用程序连接到代理的公开JMX_PORT
上,以查看这些指标.
A Kafka cluster can be monitored in granular detail via the JMX metrics it exposes. Usually an external GUI or application like jconsole
needs to be hooked up to a broker's exposed JMX_PORT
in order to view these metrics.
是否可以通过STDOUT
在SSH会话中查看代理的JMX指标?
是否可以运行本机的Kafka命令来查看这些指标?
Is there a way that I can view a broker's JMX metrics in an SSH session, via STDOUT
?
Is there a native Kafka command that I can run to view these metrics?
推荐答案
下载位于此处的jar:
Download the jar located here:
https://sourceforge.net/projects/cyclops-group/files/jmxterm/1.0-alpha-4/
在计算机上,然后运行:
On the machine, then run:
wget https://sourceforge.net/projects/cyclops-group/files/jmxterm/1.0-alpha-4/ -o jmxterm.jar
java -jar jmxterm.jar
>open localhost:$jmx_port
在此之后,帮助将为您提供所需的东西:)
Help will give you what you need after that :)
将此罐子保存在有用的地方,我几乎每天都在使用它.
Save this jar somewhere useful, I use it nearly every day.
这篇关于如何在命令行上监视Kafka代理的JMX指标?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!