Enable JMX on Kafka Brokers -
i enabled jmx on kafka brokers adding
`kafka_jmx_opts="-dcom.sun.management.jmxremote=true -dcom.sun.management.jmxremote.authenticate=false -dcom.sun.management.jmxremote.ssl=false -djava.rmi.server.hostname=<server_ip> -djava.net.preferipv4stack=true`“.
however, when use ‘kafka.tools.jmxtool’ metrics, outputs unix time stamps not expected behavior.
sh /usr/local/kafka/bin/kafka-run-class.sh kafka.tools.jmxtool -- object-name 'kafka.server:type=brokertopicmetrics,name=alltopicsmessagesinpersec' --jmx-url service:jmx:rmi:///jndi/rmi://<server_ip>:9111/jmxrmi
the above command prints out unix time stamps. how can fix , have print out metrics?
you must set 'jmx_port' variable, or add following line bin/kafka-server-start.sh.
export jmx_port=${jmx_port:-9999}
then able connect kafka jmx metrics. use jconsole tool , 'localhost:9999' address.
Comments
Post a Comment