Skip to content
Kafka Is Fun

Lesson 2 of 6

Essential Monitoring Metrics

1 min read

Overview

Kafka exposes metrics through JMX. Ones worth watching, with the exact names from the monitoring page: • kafka.server:type=ReplicaManager,name=UnderReplicatedPartitions: partitions with |ISR| < |all replicas|, normally 0 (it rises while a broker is down) • kafka.controller:type=KafkaController,name=ActiveControllerCount: exactly one node should report 1 • kafka.controller:type=KafkaController,name=OfflinePartitionsCount: offline (non-internal) topic partitions as seen by the controller • kafka.server:type=KafkaRequestHandlerPool,name=RequestHandlerAvgIdlePercent: between 0 and 1, ideally above 0.3 • kafka.network:type=SocketServer,name=NetworkProcessorAvgIdlePercent: between 0 and 1, ideally above 0.3 • kafka.server:type=BrokerTopicMetrics,name=BytesInPerSec and BytesOutPerSec: throughput • kafka.log:type=LogManager,name=OfflineLogDirectoryCount: normally 0 • Consumer lag: records-lag-max on the consumer, or kafka-consumer-groups.sh --describe

Key configuration

Enabling remote JMXproperties
# JMX_PORT enables remote JMX; KAFKA_JMX_OPTS sets the JMX options.
# Setting KAFKA_JMX_OPTS replaces the defaults in kafka-run-class.sh.
JMX_PORT=9999
# kafka-run-class.sh also appends KAFKA_OPTS to the java command.

Production tip

Check yourself

Across the nodes of a cluster, how many should report ActiveControllerCount of 1?

Sources

Checked against Kafka 4.2 documentation on Oct 2026. Draft: not yet reviewed by a Kafka specialist. Releases move on, so confirm against the current documentation before you act on a number.

Try it in the simulator

Guided scenarios for this module — the simulator opens with the exercise already running.

Prefer a picture? Open the live cluster in 3D and watch records move between producer, brokers and consumers.

Browse all troubleshooting entries