Where are the broker metrics stored?

For example the under-replicated-partition metric, I saw in the Definitive Kafka guide that to get this metric we run the following command :

# kafka-topics.sh --bootstrap-server kafka1.example.com:9092/kafka-cluster
--describe --under-replicated

(page 350 second edition)

Shouldn’t it be

# kafka-topics.sh --zookeeper localhost:2181 --describe --under-replicated-partitions

Since all the brokers’s metrics are stored in zookeeper’s servers ?

hi @rida_kejji

basically it works in both ways
see KIP-377: TopicCommand to use AdminClient - Apache Kafka - Apache Software Foundation

best,
michael

1 Like