Obtaining a list of available Kafka JMX metrics MBeans for monitoring
To obtain a list of available Kafka JMX metrics beans, you can use one of the following methods:
-
JMX tooling You can use a JMX tooling like JConsole, JVisualVM or any other JMX client to connect to the Kafka broker’s JMX server and browse the available metrics. Once you have connected to the JMX server, you can browse the MBeans tree to find the Kafka metrics.
-
Kafka documentation The Kafka documentation includes a list of available JMX metrics beans for each version of Kafka. You can find this list in the documentation for the Kafka version you are using. The documentation typically includes the names of the MBeans, their attributes, and descriptions of the metrics they provide.
-
Kafka source code You can also browse the Kafka source code to find the available JMX metrics beans. The source code includes the JMX MBean definitions, which can give you a detailed understanding of the metrics that are available. The MBean definitions are typically located in the “kafka.server” package.
Overall, using a JMX tooling or consulting Kafka documentation are the most straightforward ways to obtain a list of available Kafka JMX metrics beans.