./bin/kafka-run-class.sh kafka.tools.JmxTool \
--object-name kafka.server:type=BrokerTopicMetrics,name=MessagesInPerSec
Trying to connect to JMX url: service:jmx:rmi:///jndi/rmi://:9999/jmxrmi.
"time","kafka.server:type=BrokerTopicMetrics,name=MessagesInPerSec:Count","kafka.server:type=BrokerTopicMetrics,name=MessagesInPerSec:EventType","kafka.server:type=BrokerTopicMetrics,name=MessagesInPerSec:FifteenMinuteRate","kafka.server:type=BrokerTopicMetrics,name=MessagesInPerSec:FiveMinuteRate","kafka.server:type=BrokerTopicMetrics,name=MessagesInPerSec:MeanRate","kafka.server:type=BrokerTopicMetrics,name=MessagesInPerSec:OneMinuteRate","kafka.server:type=BrokerTopicMetrics,name=MessagesInPerSec:RateUnit"
1567588157489,0,messages,0.0,0.0,0.0,0.0,SECONDS
1567588159492,0,messages,0.0,0.0,0.0,0.0,SECONDS
1567588161494,0,messages,0.0,0.0,0.0,0.0,SECONDS
^C
JmxTool Standalone Application
kafka.tools.JmxTool
is a standalone application to print JMX metrics of a given endpoint (e.g. Kafka broker) to standard output every reporting-interval (unless one-time option is specified).
JmxTool
can be executed using kafka-run-class
shell script.
Tip
|
Enable remote JMX of a Kafka broker using
|
Option | Description |
---|---|
|
|
|
See java.text.SimpleDateFormat for options. |
|
|
|
|
|
|
|
Default: See javax.management.remote.JMXServiceURL for details. |
|
|
|
|
|
|
|
|
|
Executing Standalone Application — main
Method
main(args: Array[String]): Unit
main
is the entry point of the JmxTool
standalone application when launched on command line (e.g. from bin/kafka-configs.sh
).
Internally, main
reads the options from the command line.
main
prints out the following to standard error:
Trying to connect to JMX url: [url].
main
…FIXME