I want to write script which calculates total lag per consumer/partition. I know general command.
bin/kafka-consumer-groups -bootstrap-server :9092, :9092,:9092 --describe --group
What is best way to parse the data and print it to log? Along with topic name and consumer lag I will add timestamp every time this command is run. so I can send data to Elastic search and make a metric of total lag versus time per consumer.
We dont want to use tools kafka manager and burrow Kafka version 1.1.0
Thanks,