Kafka exposes various stats for monitoring using Yammer Metrics. We will explore this topic: how to monitor the various metrics exposed by Kafka from the server side. We will cover producer- and consumer-related metrics in the following topics.
You need to have the Kafka server up-and-running with the JMX port. To set the JMX port, you need to run Kafka using the following command.
> JMX_PORT=10101 ./bin/kafka-server-start.sh config/server.properties
Next you need to have
jconsole installed to monitor Kafka.
> jconsole 127.0.0.1:10101