Skip to content

Instantly share code, notes, and snippets.

@aswinjoseroy
Created August 1, 2018 10:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save aswinjoseroy/9a325382d3ac393e2a375baf8f02c6ff to your computer and use it in GitHub Desktop.
Save aswinjoseroy/9a325382d3ac393e2a375baf8f02c6ff to your computer and use it in GitHub Desktop.
Kafka handy commands

To see status of a Kafka Consumer Group's consumption status,

/bin/kafka-consumer-groups.sh --bootstrap-server server_ip:port --describe --group consumer_group_name | awk '{lag_sum += $5; total_sum += $4; done_sum += $3} END {print "Completed count: " done_sum ", Lag: " lag_sum ", Total number of records: " total_sum}'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment