KafkaUnderReplicatedPartitions
One or more partitions of a topic have replicas that are not keeping up with the leader.
| Severity | warning |
| Source | danielqsj/kafka_exporter 1.7+ |
| Key metrics | kafka_topic_partition_under_replicated_partition, kafka_topic_partition_in_sync_replica, kafka_topic_partition_replicas |
What it means
A partition is under-replicated when its in-sync replica set (ISR) is smaller than its replica list. A follower drops out of the ISR when it has not caught up with the leader within replica.lag.time.max.ms. The alert fires when a topic has stayed under-replicated for several minutes, which rules out the short blips seen during a normal broker restart.
Data is still being served, but durability is reduced. If the ISR shrinks below min.insync.replicas, producers using acks=all get NotEnoughReplicas errors.
Common causes
- A broker is down or restarting, so all its follower replicas are out of the ISR.
- Slow or saturated disk on one broker, so its followers cannot fetch fast enough.
- Network problems between brokers or throttled replication traffic.
- Reassignment in progress, where new replicas are still copying data.
- Traffic spike on a single large topic that followers cannot keep up with.
First checks
- See which topics and how many partitions are affected:
sum by (topic) (kafka_topic_partition_under_replicated_partition) > 0 - List the partitions and compare
ReplicaswithIsr. The broker id missing fromIsragain and again is the suspect:kafka-topics.sh --bootstrap-server <broker>:9092 --describe --under-replicated-partitions - Confirm all brokers are up:
kafka_brokers - On the suspect broker, look at disk and replication errors:
kubectl -n <kafka-namespace> exec <broker-pod> -- df -h kubectl -n <kafka-namespace> logs <broker-pod> --since=30m | grep -iE 'ReplicaFetcher|Shrinking ISR|error' - Check for a running reassignment:
kafka-reassign-partitions.sh --bootstrap-server <broker>:9092 --list
Fixing it
Restore the missing or slow broker first; followers rejoin the ISR on their own once they catch up. Fix disk saturation or move heavy partitions to less loaded brokers. If a reassignment is throttled too tightly, raise the replication throttle so it finishes. Avoid restarting more brokers until the count returns to zero.
Related alerts
- KafkaBrokersDown: the most common root cause.
- KafkaTopicPartitionNoLeader: what happens if the ISR shrinks to nothing.