Kafka
comes with various .sh script
to perform management activities on Kafka
cluster such as topic creation, partition etc. But I am after .sh script
which would allow me to inspect (discover) the active (in-force) configuration of building blocks such as broker, topic, partitions etc.
Is there any .sh script
that is available which does this configuration inspection at runtime?
Note: I would like to view all configuration key/value entries (including default and overridden if any) for broker/topic/partition together or ideally separate.
Thanks in advance.
You can use topics.sh
and describe the topic to get config detail related to the topic
, the number of partition
, replication factor
, in sync replicas
. Try
$ bin/kafka-topics.sh --describe --bootstrap-server localhost:9092 --topic my-topic
You will get something like:
Topic:my-topic PartitionCount:1 ReplicationFactor:3 Configs:
Topic: my-topic Partition: 0 Leader: 1 Replicas: 1,2,0 Isr: 1,2,0
If I understand your question correctly then you are probably after something like the following
kafka-configs.sh $ZK --describe --entity-type topics
This will provide the config for all topics. If no values exist for a topic then it means they are using the defaults (usually in server.properties
).
Instead of topics
you can also use brokers
, clients
and users
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.