How to enable remote JMX on Kafka brokers (for JmxTool)?
<p>I enabled JMX on Kafka brokers by adding </p>

<pre><code>KAFKA_JMX_OPTS="-Dcom.sun.management.jmxremote=true
                -Dcom.sun.management.jmxremote.authenticate=false
                -Dcom.sun.management.jmxremote.ssl=false
                -Djava.rmi.server.hostname=&lt;server_IP&gt;
                -Djava.net.preferIPv4Stack=true"
</code></pre>

<p>However, when I use <code>kafka.tools.JmxTool</code> to get the JMX metrics, it outputs Unix timestamps only. Why?</p>

<pre><code>./bin/kafka-run-class.sh kafka.tools.JmxTool \
  --object-name 'kafka.server:type=BrokerTopicMetrics,name=AllTopicsMessagesInPerSec' \
  --jmx-url "service:jmx:rmi:///jndi/rmi://&lt;server_IP&gt;:9111/jmxrmi"
</code></pre>

<p>How can I have it print out the metrics?</p>