# Klag — guides

> Klag is an open-source Kafka consumer lag exporter built with Vert.x and Micrometer. It monitors consumer lag, lag velocity, hot partitions, time-based lag, data-loss risk, and consumer-group state, and exports to Prometheus, Datadog, or OTLP (OpenTelemetry). It also exposes an opt-in read-only MCP endpoint for AI agents. The docs include comparisons with other Kafka tools (Burrow, KMinion, AKHQ, Confluent Control Center, Redpanda Console, Grafana, Cruise Control) and guides on how Kafka consumer lag works, common monitoring mistakes, and detecting stuck consumers.

Full index: https://klag.dev/llms.txt | Full text: https://klag.dev/llms-full.txt

## Docs

- [Common Kafka consumer monitoring mistakes](https://klag.dev/guides/consumer-monitoring-mistakes/): Six recurring mistakes teams make when monitoring Kafka consumers — alerting on absolute lag, ignoring velocity and group state, no retention headroom, per-pod blind spots — and how to avoid them.
- [How to detect stuck consumers automatically](https://klag.dev/guides/detect-stuck-consumers/): A stuck Kafka consumer has pending work but a frozen committed offset — and raw lag often misses it. Learn to detect stuck consumers with commit staleness and Klag's diagnose tool.
- [How Kafka consumer lag actually works](https://klag.dev/guides/how-kafka-consumer-lag-works/): A plain-English explanation of Kafka consumer lag — offsets, committed vs log-end offset, per-partition accounting — and what the lag number really measures.
- [Troubleshooting](https://klag.dev/guides/troubleshooting/): Diagnose missing metrics, Kafka readiness and ACL failures, filtering, MCP responses, and Prometheus ServiceMonitor discovery.
- [Why monitoring the lag value alone isn't enough](https://klag.dev/guides/why-lag-value-is-not-enough/): A single consumer-lag number hides direction, time-to-impact, and data-loss risk. Learn which extra signals — velocity, time-based lag, retention percent — give lag its missing context.
