kafka-utils icon indicating copy to clipboard operation
kafka-utils copied to clipboard

Rolling restart without Jolokia

Open ericfgarcia opened this issue 6 years ago • 3 comments

Is it possible to use the rolling restart functionality without Jolokia? We use the built in jmxremote functionality, is it possible to use that?

Thanks, Eric Garcia

ericfgarcia avatar Jan 22 '19 22:01 ericfgarcia

+1

iMajna avatar Feb 06 '20 08:02 iMajna

kafka-utils uses the Value:0 of under replicated partition that gets generated by Jolokia. Based on if the Value:0 or not the next broker is restarted. So if you can get this value and use it in your logic you should be solid. Now to get this value you can simply run export ZK="--zookeeper zk01,zk02,zk03:2181/kafka"
/bin/kafka-topics.sh $ZK --describe --under-replicated-partitions >> output.log

Now do a regex on output.log to check the under-replicated-partitions value if ( value == 0) : move to restart if not then wait.

Hope this helps.

xargs-Pratix avatar Feb 08 '20 13:02 xargs-Pratix

It's a bit old issue, but for what it worth - I switched the metric reporter to be generic using abstract methods. In my PR I've added Prometheus support, but the idea is to let users extend it to whatever metric reporters they are using as long as they implement the BaseRes abstract method: https://github.com/EladLeev/kafka-utils/blob/prometheus_support/kafka_utils/kafka_rolling_restart/response.py

EladLeev avatar Jun 10 '22 10:06 EladLeev