On this page
Kafka monitoring in one paragraph
Kafka publishes its metrics over JMX, so the collection question is only which exporter you point at it. On the brokers, four numbers carry most of the signal: UnderReplicatedPartitions and UnderMinIsrPartitionCount tell you replication is degraded and, in the second case, that acks=all writes are already failing; OfflinePartitionsCount above zero means data is unavailable right now; and ActiveControllerCount across the cluster must sum to exactly one. Below those, request handler and network processor idle percentages tell you whether the brokers have headroom. On the client side, consumer lag matters as a rate and a time-to-catch-up rather than a raw offset distance, and producer error rate and request latency show the acknowledgement path degrading before it fails. Alert on the four broker conditions, on lag that grows for longer than a deploy takes, and on producer errors; graph the rest.
Collection: JMX, and what to do with it
Every broker, producer and consumer metric Kafka keeps is exposed over JMX. In practice that means running the Prometheus JMX exporter as a Java agent on each broker, and scraping client metrics from the applications themselves rather than inferring them from the broker. Consumer lag is the exception worth a dedicated exporter, because the broker-side view and the consumer's own view disagree in exactly the situations you care about: a consumer that has stopped polling still has committed offsets sitting in __consumer_offsets, so the group looks alive from the outside.
Replication health: the four broker numbers
UnderReplicatedPartitions above zero means at least one follower has fallen out of the in-sync replica set: the cluster still serves, but you have lost redundancy. UnderMinIsrPartitionCount is more serious, because a partition below min.insync.replicas rejects every acks=all produce request, so producers are failing while the brokers look up. OfflinePartitionsCount above zero means partitions have no leader and are unavailable for both reads and writes. And ActiveControllerCount summed across the cluster must equal one; zero means no controller, two means a split brain. Those four are the page-someone list.
Saturation: request handlers, network threads and disk
RequestHandlerAvgIdlePercent and NetworkProcessorAvgIdlePercent are the brokers' headroom. Sustained values under roughly 30 per cent mean the thread pools are the bottleneck and everything downstream of them gets slower, including replication, which is how a saturation problem turns into an under-replicated-partition problem. Watch ISR shrink and expand rates alongside them: a cluster that shrinks and expands its ISR repeatedly is usually short of IO or network, not short of brokers. Disk fills are the other classic, and retention is what governs them.
Consumer lag: a rate, not a number
Lag is the distance between a partition's log end offset and the consumer group's committed offset. The absolute figure is close to meaningless on its own, because a healthy high-throughput consumer can sit thousands of messages behind and catch up in seconds. What matters is whether lag is growing, and how long the group would take to return to zero at its current consumption rate. Alert on sustained growth over a window longer than a normal deploy, and on time-to-catch-up crossing whatever the downstream system can tolerate. A static threshold pages during every rolling restart and teaches everyone to ignore it.
Rebalances: count them, and find the trigger
A rebalance halts consumption for the whole group while partitions are reassigned, so rebalance frequency is a consumption-availability metric. Track it per group. A group that rebalances on a schedule is almost always hitting max.poll.interval.ms because processing a batch takes longer than the configured interval, or losing members to session timeouts. The fix is the trigger rather than the timeout, though cooperative sticky assignment and static group membership reduce what each rebalance costs while you find it.
Producer side: error rate and the latency path
Producer record error rate above zero is always worth an alert, because a producer that cannot write is losing data unless the application handles the failure well, and most do not. Request latency is the leading indicator: it rises as the acknowledgement path degrades, well before timeouts start. Buffer-available-bytes falling toward zero means the client is producing faster than it can send and will start blocking or dropping, depending on configuration. All three are client-side metrics, which is why scraping only the brokers leaves you blind to the failure mode users notice first.
The alert list worth having
Page on: offline partitions above zero, under-min-ISR partitions above zero, active controller count not equal to one, producer error rate above zero, and consumer lag growing for longer than a deploy window. Ticket, do not page: under-replicated partitions that recover within minutes, request handler idle below thirty per cent, rebalance rate above baseline, disk above seventy per cent. Everything else belongs on a dashboard someone looks at during an incident, not in a pager rotation. The test of an alert is whether the person woken can do something about it at three in the morning.
Frequently asked questions
Which Kafka metrics should actually page someone?
Offline partitions above zero, under-min-ISR partitions above zero, active controller count not equal to one, producer record error rate above zero, and consumer lag growing over a window longer than a deploy. Under-replicated partitions and thread-pool saturation are worth a ticket rather than a page unless they persist.
What is the difference between under-replicated and under-min-ISR partitions?
Under-replicated means a follower has fallen out of the in-sync replica set, so redundancy is reduced but the partition still serves. Under-min-ISR means the in-sync set has dropped below min.insync.replicas, so acks=all produce requests are already being rejected while the brokers themselves look healthy.
How should consumer lag be alerted on?
As a rate and a time-to-catch-up, not an absolute offset distance. A healthy high-throughput consumer can sit far behind and recover in seconds, so a static threshold pages during every rolling restart. Alert on lag that keeps growing past a normal deploy window.
Is broker monitoring enough, or do client metrics matter?
Client metrics matter, and broker-only monitoring misses the failures users notice first. Producer error rate, request latency and consumer lag live on the client side; a consumer that has stopped polling can still look alive from the broker's view of committed offsets.
Related
Where this gets done
The work behind this page, run by the same engineers who wrote it.
- 24/7 Kafka supportSelf-managed, MSK or Confluent Platform
- Kafka consultingPartition strategy, sizing, security and migration
- RabbitMQ supportIf the estate runs both brokers
- Kubernetes and container servicesKafka on Kubernetes, operated with your team
- Enterprise MQ supportOne contract across Kafka, RabbitMQ and IBM MQ
- Enterprise support plansSLA tiers and what each covers
- Enterprise MQ consultingMulti-broker architecture and migration
Other Kafka guides, comparisons and research
Recent Kafka articles
- Kafka on Kubernetes: EKS vs AKS vs GKESep 2026
- Kafka vs Pulsar: Which to ChooseSep 2026
- Is Kafka 4.0 (KRaft, No ZooKeeper) Production-Ready?Sep 2026
- RabbitMQ vs Kafka: What Decides ItSep 2026
- Kafka Security Best Practices: SASL, ACLs & EncryptionSep 2026
- Kafka Exactly-Once Semantics: How It Works & Its LimitsSep 2026
Need this done on your Kafka estate?
Named senior Kafka engineers, 24/7, with a 15-minute emergency SLA — self-managed, MSK or Confluent Platform.