根因决策树(指标 → 可能原因)
📍 OfflinePartitionsCount > 0
└─ 立刻看 controller.log
└─ 多个 Broker 同时宕:磁盘 / 电源 / 机房网络
└─ Controller 异常:选举循环、ZK/KRaft 通信失败
📍 UnderReplicatedPartitions > 0 持续 5 分钟
├─ 检查 ReplicaFetcher Lag → Follower 跟不上
├─ 网络限流:调 replica.fetch.max.bytes
├─ Follower GC 暂停:调 JVM
└─ 磁盘满 / 慢:换盘或迁移分区
└─ Broker 宕机:拉起或人工切 Leader
📍 RequestHandlerIdle < 20%
└─ I/O 线程不够 → num.io.threads 翻倍
📍 Consumer Lag 暴涨
├─ 上游写入暴涨 → 看 MessagesInPerSec
├─ 消费者 Rebalance 频繁 → 调 max.poll.interval.ms
└─ 业务处理慢 → 看应用 / DB / 外部调用
📍 ISR 频繁抖动 (Shrink+Expand 配对)
├─ 跨机房网络抖动 → 调 replica.lag.time.max.ms
└─ Follower GC / 磁盘 IO 间歇性卡
📍 UncleanLeaderElectionsPerSec > 0
└─ 已发生数据丢失!立刻确认是否误开 unclean.leader.election.enable