Skip to main content

Commands


Topic Consumer Group & Lag

Use akw 'NR==2 || /topic-name/' to get header row.

kafka-consumer-groups.sh --bootstrap-server localhost:9092 --all-groups --describe | awk 'NR==2 || /topic-name/'
GROUP  TOPIC  PARTITION  CURRENT-OFFSET  LOG-END-OFFSET  LAG  CONSUMER-ID                  HOST      CLIENT-ID
foo    bar    1          1586086         1586086         0    consumer-rv-consumer-21-xxx  /x.x.x.x  consumer-foo-21
foo    bar    3          1590547         1590547         0    consumer-rv-consumer-22-xxx  /x.x.x.x  consumer-foo-22