如何在命令行上监视Kafka代理的JMX指标? [英] How to monitor JMX metrics of Kafka broker on command line?

查看:151
本文介绍了如何在命令行上监视Kafka代理的JMX指标?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可以通过其公开的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屋!

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