Monitoring Kafka Consumer Groups with kafka-consumer-groups and Kafka Manager
This article explains how to monitor Kafka consumer groups using the built‑in kafka‑consumer‑groups tool and the Kafka Manager UI, providing commands, field explanations, and setup steps to ensure real‑time data availability for downstream services such as MongoDB or Elasticsearch.
When dealing with slow MySQL queries, the author suggests precomputing results into MongoDB or Elasticsearch, requiring MySQL binlog data to be sent to Kafka and consumed in real time. Monitoring Kafka consumption is crucial because blockages can prevent up‑to‑date data from being available.
kafka-consumer-groups
The kafka-consumer-groups.sh script, located in Kafka's bin directory, lists all consumer groups and describes the consumption status of a specific group.
./kafka-consumer-groups.sh --bootstrap-server 127.0.0.1:9092 --listTo view details of a group (e.g., Test-Group) run:
./kafka-consumer-groups.sh --bootstrap-server 127.0.0.1:9092 --describe --group Test-GroupThe output includes fields such as TOPIC, PARTITION, CURRENT-OFFSET, LOG-END-OFFSET, LAG, CONSUMER-ID, HOST, and CLIENT-ID, which indicate the consumption lag and consumer status.
Kafka Manager
Kafka Manager provides a richer UI for monitoring consumer groups and managing topics and partitions. Download it from GitHub , unpack, and build with sbt clean dist. After configuring application.conf (e.g., setting kafka-manager.zkhosts) and running ./kafka-manager, access the web UI (default port 9000) to view consumer groups, broker partitions, and per‑topic consumption status.
Images in the original article illustrate the command output and the Kafka Manager UI.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Big Data Technology & Architecture
Wang Zhiwu, a big data expert, dedicated to sharing big data technology.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
