Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

Rolling restart without Jolokia #210

Open
ericfgarcia opened this issue Jan 22, 2019 · 3 comments
Open

Rolling restart without Jolokia #210

ericfgarcia opened this issue Jan 22, 2019 · 3 comments

Comments

@ericfgarcia
Copy link

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

@iMajna
Copy link

iMajna commented Feb 6, 2020

+1

@xargs-Pratix
Copy link

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.

@EladLeev
Copy link
Contributor

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants