Skip to content

Instantly share code, notes, and snippets.

@fuyar
Forked from aswinjoseroy/kafka_handy_commands.md
Created November 26, 2018 15:01
Show Gist options
  • Select an option

  • Save fuyar/4ba173da2574c39fbe9345bf74a2315f to your computer and use it in GitHub Desktop.

Select an option

Save fuyar/4ba173da2574c39fbe9345bf74a2315f 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