Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Retrieving Kafka broker properties from a client

Tags:

apache-kafka

I was wondering if there is a way to retrieve all the configuration properties of a kafka broker using a shell command?

For eg, something like:

./kafka-configs.sh --zookeeper ${broker_ip}:2181 --entity-type brokers --describe

The above doesn't return any value, but I hope the question is clearer looking at the command

like image 994
irrelevantUser Avatar asked Sep 12 '25 00:09

irrelevantUser


1 Answers

You can find the configuration in the log file of Kafka broker which is printed on broker start up. I am afraid that there is such command that lists all the configuration parameters of a Kafka broker.

Some more information regarding Kafka brokers can be retrieved through Zookeeper (however these commands won't give you the kafka configuration). To do so,

Enter Zookeeper shell:

zookeeper-shell localhost:2181

and run

get /brokers/ids/0

to retrieve some further information for broker with id 0.

EDIT:

Although kafka-configs claims to be able to describe kafka configuration, command

kafka-configs --bootstrap-server localhost:9092 --describe --entity-type brokers --entity-name 0
Configs for broker 0 are:

doesn't seem to return any configuration parameters.

like image 64
Giorgos Myrianthous Avatar answered Sep 16 '25 10:09

Giorgos Myrianthous



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!