Skip to main content
Version: v1.5.x

Monitor:Apache Kafka

Collect and monitor the general performance Metrics of Apache Kafka.

Protocol Use:JMX

Kafka Enable JMX Protocol

  1. Install Kafka

  2. Modify kafka-server-start.sh

Append content in kafka-server-start.sh, Attention Replace Port And IP.

export JMX_PORT=9999;
export KAFKA_JMX_OPTS="-Djava.rmi.server.hostname=ip地址 -Dcom.sun.management.jmxremote.rmi.port=9999 -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false";

# Already Has
exec $base_dir/kafka-run-class.sh $EXTRA_ARGS kafka.Kafka "$@"

Configuration parameter

Parameter nameParameter help description
Monitoring HostMonitored IPV4, IPV6 or domain name. Note⚠️Without protocol header (eg: https://, http://)
Monitoring nameIdentify the name of this monitoring. The name needs to be unique
PortPort provided by JMX
UsernameJMX connection user name, optional
PasswordJMX connection password, optional
Collection intervalInterval time of monitor periodic data collection, unit: second, and the minimum interval that can be set is 30 seconds
Whether to detectWhether to detect and check the availability of monitoring before adding monitoring. Adding and modifying operations will continue only after the detection is successful
Description remarksFor more information about identifying and describing this monitoring, users can note information here

Collection Metrics

Metrics Set:server_info

Metric nameMetric unitMetric help description
VersionKafka Version
StartTimeMsmsStart Time
CommitIdVersion Commit ID

Metrics Set:memory_pool

Metric nameMetric unitMetric help description
namemetrics name
committedkbtotal size
initkbinit size
maxkbmax size
usedkbused size

Metrics Set:active_controller_count

Metric nameMetric unitMetric help description
Valueserver active controller count

Metrics Set:broker_partition_count

Metric nameMetric unitMetric help description
Valuebroker partition count

Metrics Set:broker_leader_count

Metric nameMetric unitMetric help description
Valuebroker leader count

Metrics Set:broker_handler_avg_percent

Metric nameMetric unitMetric help description
EventTypeevent type
RateUnitrate unit
Countpercent count
OneMinuteRate%One Minute Rate
FiveMinuteRate%Five Minute Rate
MeanRate%Mean Rate
FifteenMinuteRate%Fifteen Minute Rate