Hi Rajesh, not sure what your use case is, but apparently there is a Kafka 
tools class (Kafka.tools.JmxTool) that can be run with Kafka-run-class.sh to 
view broker metrics (you have to enable a remote JMX port first):

https://jaceklaskowski.gitbooks.io/apache-kafka/content/kafka-tools-JmxTool.html

Will this work? Is it a good idea? Not sure, sorry! Regards, Paul Brebner

From: Rajesh Naicken <[email protected]>
Date: Thursday, 9 October 2025 at 9:05 am
To: [email protected] <[email protected]>
Subject: What is best command line method to fetch the kafka metrics

[You don't often get email from [email protected]. Learn why this is 
important at https://aka.ms/LearnAboutSenderIdentification ]

EXTERNAL EMAIL - USE CAUTION when clicking links or attachments




Hi
Is there a good method to collect kafka metrics via command line instead of 
using grafana or console etc .. ?

Thanks
Rajesh



Rajesh G Naicken -  Senior Software Engineer - Appliance Security and DR 
Architect

IBM Data & AI  www: 
https://urldefense.com/v3/__http://www.ibm.com__;!!Nhn8V6BzJA!XlxA1jZyvhPPl8d_okM-Lb1QzACpmAwRZ3rdALkIBQkNDojoeFS1oR6_lbl-vzny-yxD8JdtxVZlbcazRTlZVqA$

Email: [email protected], Ph: +91 9177753780



"Do your best to make sure your actions affect others in a positive way" - Tri 
Hita Karana

Reply via email to