0

I know we could use script to get partition count for a topic (reference), like following,

./kafka-topics.sh --describe --zookeeper localhost:2181 --topic topic_name

The result is

Topic:topic_name    PartitionCount:2    ReplicationFactor:1 Configs:
      Topic: topic_name Partition: 0    Leader: 0   Replicas: 0 Isr: 0
      Topic: topic_name Partition: 1    Leader: 0   Replicas: 0 Isr: 0

How could we use JMX to monitor the number of partitions for a specific topic in one broker?

StackCoding
  • 103
  • 2
  • 8
  • Have you taken a look through the existing Mbeans in the JMX console? – OneCricketeer Sep 22 '18 at 23:18
  • @cricket_007 I've checked [JMX Mbeans List](https://gist.github.com/thbkrkr/77c8f6f9a301d7b16555726793af8301), not find anything I wanted. And it seems that this JMX Mbean List is not official. I cannot find any official JMX Mbeans document – StackCoding Sep 25 '18 at 00:25
  • The JMX patterns are on the Confluent site https://docs.confluent.io/current/kafka/monitoring.html#server-metrics as well as Kafka documentation https://kafka.apache.org/documentation/#monitoring – OneCricketeer Sep 25 '18 at 00:43

0 Answers0