1 Overview
There is a document word in the source code: kafka-0.10/docs/ops.html
under the path
Monitoring configuration
Kafka is basically divided into three sub-items: broker, producer, and consumer. The startup of each item requires the $KAFKA_HOME/bin/kafka-run-class.sh script. In this script, the following statements exist:
if ...
KAFKA_JMX_OPTS="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false"
fi
if ...
KAFKA_JMX_OPTS="$KAFKA_JMX_OPTS -Dcom.sun.management.jmxremote.port=$JMX_PORT "
fi
In the process of starting Kafka , as long as the value of JMX_PORT is specified, the broker, producer, and consumer can be monitored. There are currently two methods,
in