What to Monitor
Most Important Broker Metrics
| JMX metric (kafka.server...) | Healthy value | Alert when |
|---|---|---|
ReplicaManager UnderReplicatedPartitions | 0 | > 0 for more than a few minutes |
ReplicaManager UnderMinIsrPartitionCount | 0 | > 0 (producers with acks=all fail) |
KafkaController OfflinePartitionsCount | 0 | > 0 immediately |
KafkaController ActiveControllerCount | Exactly 1 across the cluster | Not equal to 1 |
ReplicaManager IsrShrinksPerSec / IsrExpandsPerSec | Near 0 | Sustained activity (ISR flapping) |
BrokerTopicMetrics BytesInPerSec / BytesOutPerSec / MessagesInPerSec | Matches normal load | Large drops or spikes versus baseline |
RequestMetrics TotalTimeMs (Produce, FetchConsumer) | p99 within your SLO | p99 doubles from baseline |
KafkaRequestHandlerPool RequestHandlerAvgIdlePercent | Above 0.3 | Below 0.2 (handler threads saturated) |
SocketServer NetworkProcessorAvgIdlePercent | Above 0.3 | Below 0.2 |
Log LogFlushRateAndTimeMs | Low | High values show slow disks |
Host and JVM
- Disk free per log directory (alert at 70 percent warning, 85 percent critical)
- Disk latency and utilisation (
iostat), network errors and saturation - Open file descriptors versus the limit
- GC pause time (alert when pauses reach seconds) and heap usage after GC
- Page cache hit behaviour (reads going to disk for consumers that should be near the head)
Client Metrics
| Client | Metrics |
|---|---|
| Producer | record-error-rate, record-retry-rate, request-latency-avg, batch-size-avg, buffer-available-bytes, produce-throttle-time-avg |
| Consumer | records-lag-max, fetch-rate, commit-latency-avg, rebalance-total, last-poll-seconds-ago, records-consumed-rate |
Expose these from your applications through Micrometer (Spring Boot) or the OpenTelemetry Java agent into Prometheus.
Collecting Metrics with Prometheus
Kafka exposes metrics over JMX. Run the Prometheus JMX Exporter as a Java agent in each broker, which turns MBeans into an HTTP endpoint.
Consumer Lag Monitoring
Consumer lag is usually the most important application-level signal. Collect it from outside the consumers, so you also see groups that have stopped completely.
| Tool | Notes |
|---|---|
| kafka-exporter (Prometheus) | Exposes kafka_consumergroup_lag and topic offsets. Simple to run |
| Burrow (LinkedIn) | Evaluates lag trends over time and reports OK, warning or error status per group, good at avoiding false alarms |
| Kafka UI, AKHQ, Redpanda Console, Kafdrop | Web interfaces to inspect topics, groups and messages |
| Cloud or vendor tools | Confluent Control Center, MSK and Cloud Monitoring dashboards |
Alert Rules (Prometheus)
deriv() or Burrow-style trend checks, and alert when lag has not moved for a group that should be active.
Grafana Dashboard Layout
| Row | Panels |
|---|---|
| Cluster health | Active controller, offline partitions, under-replicated partitions, brokers online |
| Throughput | Messages in/s, bytes in/s, bytes out/s per broker and per top topics |
| Latency | Produce and fetch p50, p99 total time, request queue time |
| Resources | CPU, heap, GC time, disk used and I/O, network |
| Consumers | Lag per group, rebalance count, consumption rate |
| Business | End-to-end latency from event timestamp to processing time |
Daily Health Checklist
- No offline or under-replicated partitions, one active controller
- Disk growth in line with plan, no volume above 70 percent
- Consumer lag stable for all important groups
- No unusual error rates or throttling
- Certificates valid for at least 30 more days
- Backups and mirror lag fine (if used)
Conclusion
Monitor the host, JVM, brokers, topics and clients. Use the JMX exporter with Prometheus and Grafana, watch under-replicated and offline partitions, controller count, request latency and disk, monitor consumer lag from outside, and alert on trends.

