<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>article How to troubleshoot missing Topic metrics from Apache Kafka extension in Troubleshooting</title>
    <link>https://community.dynatrace.com/t5/Troubleshooting/How-to-troubleshoot-missing-Topic-metrics-from-Apache-Kafka/ta-p/273203</link>
    <description>&lt;P&gt;&lt;LI-TOC indent="15" liststyle="disc" maxheadinglevel="2"&gt;&lt;/LI-TOC&gt;&lt;/P&gt;
&lt;DIV class="lia-message-template-content-zone"&gt;
&lt;DIV class="lia-message-template-content-zone"&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV class="lia-message-template-content-zone"&gt;
&lt;H1 id="toc-hId-1846786847"&gt;Summary&lt;/H1&gt;
&lt;P&gt;The Apache Kafka extension promises deep and wide monitoring of all Kafka components. And yet, even if the configuration is in line with documentation, metrics might still be missing. How can we troubleshoot that?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H1 id="toc-hId--705370114"&gt;Problem&lt;/H1&gt;
&lt;P&gt;Often, topics set up to be monitored with the Apache Kafka extension show no or limited metrics, even if they appear as detected entities.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Lefteris_0-1742568017176.png" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/27106iDAED148BA21B5677/image-size/large?v=v2&amp;amp;px=999" role="button" title="Lefteris_0-1742568017176.png" alt="Lefteris_0-1742568017176.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The answer as to why this happens almost certainly lies outside the context of the extension itself.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H1 id="toc-hId-1037440221"&gt;Troubleshooting steps&lt;/H1&gt;
&lt;P&gt;There’s a simple, general truth that guides the function of all Dynatrace extensions: the extension will only show what it can find. When it comes to Apache Kafka, the source of the metric data points is JMX MBeans.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H2&gt;JMX MBeans&lt;/H2&gt;
&lt;P&gt;In short, &lt;A href="https://docs.oracle.com/javase/8/docs/technotes/guides/management/agent.html" target="_blank" rel="noopener"&gt;JMX (Java Management Extensions)&lt;/A&gt; is a set of built-in management tools enabled out-of-the-box for JVMs. MBeans are Java objects that are designed for the JMX specification and are used to expose attributes and operations of various types of resources.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;Topic Metrics&lt;/H3&gt;
&lt;P&gt;Topic metrics are gathered from three distinct JMX domains:&amp;nbsp;&lt;FONT face="courier new,courier"&gt;kafka.server&lt;/FONT&gt;, &lt;FONT face="courier new,courier"&gt;kafka.consumer&lt;/FONT&gt;, and &lt;FONT face="courier new,courier"&gt;kafka.producer&lt;/FONT&gt;. That’s because, unlike Kafka Brokers, Producers, and Consumers, Topics are not individual processes with their own specific metrics. They are logical channels that receive messages from Producers, work with Brokers to manage storage, and expose those messages for reading to Consumers.&lt;/P&gt;
&lt;P&gt;So in order to be complete, Topic monitoring requires data from all other Apache Kafka entities:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Broker metrics (&lt;FONT face="courier new,courier"&gt;kafka.server&lt;/FONT&gt;) provide information about data storage, partition count, and message throughput.&lt;/LI&gt;
&lt;LI&gt;Producer metrics (&lt;FONT face="courier new,courier"&gt;kafka.producer&lt;/FONT&gt;) offer data on message production rates, request latency, and error rates.&lt;/LI&gt;
&lt;LI&gt;Consumer metrics (&lt;FONT face="courier new,courier"&gt;kafka.consumer&lt;/FONT&gt;) include data on message consumption rates, lag, and processing errors.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;MBeans specific to Kafka Consumers and Producers are not present on any processes that are part of the Kafka Broker instances. They are only present in the processes running the consumer and producer clients. It follows that, if you don't see &lt;FONT face="courier new,courier"&gt;kafka.consumer&lt;/FONT&gt;&amp;nbsp;metrics, it's likely because the consumer processes themselves are not running in your deployment or are not configured to expose JMX metrics.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;&amp;nbsp;Features to enable and configure&lt;/H3&gt;
&lt;P&gt;The steps below apply to Consumer metrics, but they can be applied equally to Producer metrics.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;No running client means no MBeans. So, first, make sure that you have running Kafka Consumer applications.&lt;/LI&gt;
&lt;LI&gt;Once the above is taken care of, the Consumer JVMs must be configured to expose JMX metrics. You can do that with environment variables or with Java system properties. Going by the former option, you need to use the following:
&lt;UL class="lia-list-style-type-circle"&gt;
&lt;LI&gt;&lt;FONT face="courier new,courier"&gt;JMX_PORT&lt;/FONT&gt;: The port that JMX listens on for incoming connections.&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face="courier new,courier"&gt;JMX_HOSTNAME&lt;/FONT&gt;: The IP that JMX clients will use to connect to the JMX server to access MBeans.&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face="courier new,courier"&gt;KAFKA_JMX_OPTS&lt;/FONT&gt;: JMX options. Use this variable to override the default JMX options, such as whether authentication is enabled. The default options are set as follows:
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;-Djava.rmi.server.hostname=127.0.0.1&lt;/FONT&gt; &lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;-Dcom.sun.management.jmxremote=true &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;-Dcom.sun.management.jmxremote.authenticate=false&lt;/FONT&gt; &lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;-Dcom.sun.management.jmxremote.ssl=false&lt;/FONT&gt;&lt;/P&gt;
Here's what each of them refers to:&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;java.rmi.server.hostname&lt;/FONT&gt;:&amp;nbsp;IP address that the RMI server uses to bind MBeans. The default is &lt;FONT face="courier new,courier"&gt;localhost&lt;/FONT&gt;. This doesn’t have to be the same as &lt;FONT face="courier new,courier"&gt;JMX_HOSTNAME&lt;/FONT&gt;. For example, in a Docker environment, you might set &lt;FONT face="courier new,courier"&gt;java.rmi.server.hostname&lt;/FONT&gt; to the container's internal IP address and &lt;FONT face="courier new,courier"&gt;JMX_HOSTNAME&lt;/FONT&gt; to the host machine's IP address to ensure proper connectivity from outside the container.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;jmxremote=true&lt;/FONT&gt;: If that’s set to false, no remote client can connect to the JMX server.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;jmxremote.authenticate=false&lt;/FONT&gt;: Indicates that authentication is off by default.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;jmxremote.ssl=false&lt;/FONT&gt;: Indicates that TLS/SSL is off by default.&lt;/P&gt;
&lt;P&gt;So, for example, to start Kafka and specify a JMX port, you can use the following command:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;JMX_PORT=2020 ./bin/kafka-server-start.sh ./etc/kafka/kraft/server.properties&lt;/LI-CODE&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;H3&gt;&amp;nbsp;&lt;/H3&gt;
&lt;H2&gt;JConsole&lt;/H2&gt;
&lt;P&gt;Now that the above are enabled, you should be able to see consumer MBeans in JConsole, which comes with Java out-of-the-box. To quote the &lt;A href="https://docs.oracle.com/javase/8/docs/technotes/guides/management/jconsole.html" target="_self"&gt;official docs&lt;/A&gt;:&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;The JConsole graphical user interface is a monitoring tool that complies to the Java Management Extensions (JMX) specification. JConsole uses the extensive instrumentation of the Java Virtual Machine (Java VM) to provide information about the performance and resource consumption of applications running on the Java platform.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;You can start it by simply typing the &lt;FONT face="courier new,courier"&gt;jconsole&lt;/FONT&gt; command. When the “New Connection” window comes up, if Kafka is running locally, you will see it as a selectable Local Process. If, instead, you run Kafka remotely, you need to select Remote Process, then enter the hostname and port you specified in your JMX configuration. Once that’s done, you can then Connect.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Lefteris_1-1742568925731.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/27107iF6B255ACADCD50BD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Lefteris_1-1742568925731.png" alt="Lefteris_1-1742568925731.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;&lt;EM&gt;Screenshot taken from &lt;A href="https://docs.confluent.io/platform/current/kafka/monitoring.html" target="_self"&gt;Confluent docs&lt;/A&gt;.&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;If you’ve set authentication to true, you will have to provide a valid username and password. Otherwise, you may be prompted to make an insecure connection.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H1 id="toc-hId--1514716740"&gt;Resolution&lt;/H1&gt;
&lt;P&gt;Now that the connection is established, you should be able to select the MBeans tab and expand the folders to see the JMX events and attributes for those events.&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Lefteris_2-1742568925733.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/27108iDA999B2E20C22FDF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Lefteris_2-1742568925733.png" alt="Lefteris_2-1742568925733.png" /&gt;&lt;/span&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;&lt;EM&gt;Screenshot taken from &lt;A href="https://docs.confluent.io/platform/current/kafka/monitoring.html" target="_self"&gt;Confluent docs&lt;/A&gt;.&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Notice that you should be looking for MBeans queried with:&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;kafka.consumer:type=consumer-metrics&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;kafka.consumer:type=consumer-fetch-manager-metrics&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;kafka.producer:type=producer-topic-metrics&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Also, keep in mind that those metrics have &lt;FONT face="courier new,courier"&gt;client-id&lt;/FONT&gt; and &lt;FONT face="courier new,courier"&gt;topic&lt;/FONT&gt; dimensions – you might want to look at the values in those too.&lt;/P&gt;
&lt;P&gt;If you do not see an MBean that you expected for a feature or component, you should then make sure that the feature or component that generates it is successfully enabled. Also, that you are viewing the correct process.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H1 id="toc-hId-228093595"&gt;What's next&lt;/H1&gt;
&lt;P&gt;If you're still stuck, your next step should be to open a support ticket. Make sure you include:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Links and screenshots that show which entities are missing which metrics.&lt;/LI&gt;
&lt;LI&gt;Full description of the outcome from the above steps. Make sure the exposed mbeans are visible. You can also use a cli tool to dump them (e.g. &lt;A href="https://docs.cyclopsgroup.org/jmxterm" target="_self"&gt;jmxterm&lt;/A&gt;) and share them in the ticket as a file.&lt;/LI&gt;
&lt;/UL&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
    <pubDate>Mon, 14 Apr 2025 07:39:18 GMT</pubDate>
    <dc:creator>Lefteris</dc:creator>
    <dc:date>2025-04-14T07:39:18Z</dc:date>
    <item>
      <title>How to troubleshoot missing Topic metrics from Apache Kafka extension</title>
      <link>https://community.dynatrace.com/t5/Troubleshooting/How-to-troubleshoot-missing-Topic-metrics-from-Apache-Kafka/ta-p/273203</link>
      <description>&lt;P&gt;&lt;LI-TOC indent="15" liststyle="disc" maxheadinglevel="2"&gt;&lt;/LI-TOC&gt;&lt;/P&gt;
&lt;DIV class="lia-message-template-content-zone"&gt;
&lt;DIV class="lia-message-template-content-zone"&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV class="lia-message-template-content-zone"&gt;
&lt;H1 id="toc-hId-1846786847"&gt;Summary&lt;/H1&gt;
&lt;P&gt;The Apache Kafka extension promises deep and wide monitoring of all Kafka components. And yet, even if the configuration is in line with documentation, metrics might still be missing. How can we troubleshoot that?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H1 id="toc-hId--705370114"&gt;Problem&lt;/H1&gt;
&lt;P&gt;Often, topics set up to be monitored with the Apache Kafka extension show no or limited metrics, even if they appear as detected entities.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Lefteris_0-1742568017176.png" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/27106iDAED148BA21B5677/image-size/large?v=v2&amp;amp;px=999" role="button" title="Lefteris_0-1742568017176.png" alt="Lefteris_0-1742568017176.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The answer as to why this happens almost certainly lies outside the context of the extension itself.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H1 id="toc-hId-1037440221"&gt;Troubleshooting steps&lt;/H1&gt;
&lt;P&gt;There’s a simple, general truth that guides the function of all Dynatrace extensions: the extension will only show what it can find. When it comes to Apache Kafka, the source of the metric data points is JMX MBeans.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H2&gt;JMX MBeans&lt;/H2&gt;
&lt;P&gt;In short, &lt;A href="https://docs.oracle.com/javase/8/docs/technotes/guides/management/agent.html" target="_blank" rel="noopener"&gt;JMX (Java Management Extensions)&lt;/A&gt; is a set of built-in management tools enabled out-of-the-box for JVMs. MBeans are Java objects that are designed for the JMX specification and are used to expose attributes and operations of various types of resources.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;Topic Metrics&lt;/H3&gt;
&lt;P&gt;Topic metrics are gathered from three distinct JMX domains:&amp;nbsp;&lt;FONT face="courier new,courier"&gt;kafka.server&lt;/FONT&gt;, &lt;FONT face="courier new,courier"&gt;kafka.consumer&lt;/FONT&gt;, and &lt;FONT face="courier new,courier"&gt;kafka.producer&lt;/FONT&gt;. That’s because, unlike Kafka Brokers, Producers, and Consumers, Topics are not individual processes with their own specific metrics. They are logical channels that receive messages from Producers, work with Brokers to manage storage, and expose those messages for reading to Consumers.&lt;/P&gt;
&lt;P&gt;So in order to be complete, Topic monitoring requires data from all other Apache Kafka entities:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Broker metrics (&lt;FONT face="courier new,courier"&gt;kafka.server&lt;/FONT&gt;) provide information about data storage, partition count, and message throughput.&lt;/LI&gt;
&lt;LI&gt;Producer metrics (&lt;FONT face="courier new,courier"&gt;kafka.producer&lt;/FONT&gt;) offer data on message production rates, request latency, and error rates.&lt;/LI&gt;
&lt;LI&gt;Consumer metrics (&lt;FONT face="courier new,courier"&gt;kafka.consumer&lt;/FONT&gt;) include data on message consumption rates, lag, and processing errors.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;MBeans specific to Kafka Consumers and Producers are not present on any processes that are part of the Kafka Broker instances. They are only present in the processes running the consumer and producer clients. It follows that, if you don't see &lt;FONT face="courier new,courier"&gt;kafka.consumer&lt;/FONT&gt;&amp;nbsp;metrics, it's likely because the consumer processes themselves are not running in your deployment or are not configured to expose JMX metrics.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;&amp;nbsp;Features to enable and configure&lt;/H3&gt;
&lt;P&gt;The steps below apply to Consumer metrics, but they can be applied equally to Producer metrics.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;No running client means no MBeans. So, first, make sure that you have running Kafka Consumer applications.&lt;/LI&gt;
&lt;LI&gt;Once the above is taken care of, the Consumer JVMs must be configured to expose JMX metrics. You can do that with environment variables or with Java system properties. Going by the former option, you need to use the following:
&lt;UL class="lia-list-style-type-circle"&gt;
&lt;LI&gt;&lt;FONT face="courier new,courier"&gt;JMX_PORT&lt;/FONT&gt;: The port that JMX listens on for incoming connections.&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face="courier new,courier"&gt;JMX_HOSTNAME&lt;/FONT&gt;: The IP that JMX clients will use to connect to the JMX server to access MBeans.&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face="courier new,courier"&gt;KAFKA_JMX_OPTS&lt;/FONT&gt;: JMX options. Use this variable to override the default JMX options, such as whether authentication is enabled. The default options are set as follows:
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;-Djava.rmi.server.hostname=127.0.0.1&lt;/FONT&gt; &lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;-Dcom.sun.management.jmxremote=true &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;-Dcom.sun.management.jmxremote.authenticate=false&lt;/FONT&gt; &lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;-Dcom.sun.management.jmxremote.ssl=false&lt;/FONT&gt;&lt;/P&gt;
Here's what each of them refers to:&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;java.rmi.server.hostname&lt;/FONT&gt;:&amp;nbsp;IP address that the RMI server uses to bind MBeans. The default is &lt;FONT face="courier new,courier"&gt;localhost&lt;/FONT&gt;. This doesn’t have to be the same as &lt;FONT face="courier new,courier"&gt;JMX_HOSTNAME&lt;/FONT&gt;. For example, in a Docker environment, you might set &lt;FONT face="courier new,courier"&gt;java.rmi.server.hostname&lt;/FONT&gt; to the container's internal IP address and &lt;FONT face="courier new,courier"&gt;JMX_HOSTNAME&lt;/FONT&gt; to the host machine's IP address to ensure proper connectivity from outside the container.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;jmxremote=true&lt;/FONT&gt;: If that’s set to false, no remote client can connect to the JMX server.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;jmxremote.authenticate=false&lt;/FONT&gt;: Indicates that authentication is off by default.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;jmxremote.ssl=false&lt;/FONT&gt;: Indicates that TLS/SSL is off by default.&lt;/P&gt;
&lt;P&gt;So, for example, to start Kafka and specify a JMX port, you can use the following command:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;JMX_PORT=2020 ./bin/kafka-server-start.sh ./etc/kafka/kraft/server.properties&lt;/LI-CODE&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;H3&gt;&amp;nbsp;&lt;/H3&gt;
&lt;H2&gt;JConsole&lt;/H2&gt;
&lt;P&gt;Now that the above are enabled, you should be able to see consumer MBeans in JConsole, which comes with Java out-of-the-box. To quote the &lt;A href="https://docs.oracle.com/javase/8/docs/technotes/guides/management/jconsole.html" target="_self"&gt;official docs&lt;/A&gt;:&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;The JConsole graphical user interface is a monitoring tool that complies to the Java Management Extensions (JMX) specification. JConsole uses the extensive instrumentation of the Java Virtual Machine (Java VM) to provide information about the performance and resource consumption of applications running on the Java platform.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;You can start it by simply typing the &lt;FONT face="courier new,courier"&gt;jconsole&lt;/FONT&gt; command. When the “New Connection” window comes up, if Kafka is running locally, you will see it as a selectable Local Process. If, instead, you run Kafka remotely, you need to select Remote Process, then enter the hostname and port you specified in your JMX configuration. Once that’s done, you can then Connect.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Lefteris_1-1742568925731.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/27107iF6B255ACADCD50BD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Lefteris_1-1742568925731.png" alt="Lefteris_1-1742568925731.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;&lt;EM&gt;Screenshot taken from &lt;A href="https://docs.confluent.io/platform/current/kafka/monitoring.html" target="_self"&gt;Confluent docs&lt;/A&gt;.&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;If you’ve set authentication to true, you will have to provide a valid username and password. Otherwise, you may be prompted to make an insecure connection.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H1 id="toc-hId--1514716740"&gt;Resolution&lt;/H1&gt;
&lt;P&gt;Now that the connection is established, you should be able to select the MBeans tab and expand the folders to see the JMX events and attributes for those events.&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Lefteris_2-1742568925733.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/27108iDA999B2E20C22FDF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Lefteris_2-1742568925733.png" alt="Lefteris_2-1742568925733.png" /&gt;&lt;/span&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;&lt;EM&gt;Screenshot taken from &lt;A href="https://docs.confluent.io/platform/current/kafka/monitoring.html" target="_self"&gt;Confluent docs&lt;/A&gt;.&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Notice that you should be looking for MBeans queried with:&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;kafka.consumer:type=consumer-metrics&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;kafka.consumer:type=consumer-fetch-manager-metrics&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;kafka.producer:type=producer-topic-metrics&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Also, keep in mind that those metrics have &lt;FONT face="courier new,courier"&gt;client-id&lt;/FONT&gt; and &lt;FONT face="courier new,courier"&gt;topic&lt;/FONT&gt; dimensions – you might want to look at the values in those too.&lt;/P&gt;
&lt;P&gt;If you do not see an MBean that you expected for a feature or component, you should then make sure that the feature or component that generates it is successfully enabled. Also, that you are viewing the correct process.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H1 id="toc-hId-228093595"&gt;What's next&lt;/H1&gt;
&lt;P&gt;If you're still stuck, your next step should be to open a support ticket. Make sure you include:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Links and screenshots that show which entities are missing which metrics.&lt;/LI&gt;
&lt;LI&gt;Full description of the outcome from the above steps. Make sure the exposed mbeans are visible. You can also use a cli tool to dump them (e.g. &lt;A href="https://docs.cyclopsgroup.org/jmxterm" target="_self"&gt;jmxterm&lt;/A&gt;) and share them in the ticket as a file.&lt;/LI&gt;
&lt;/UL&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Mon, 14 Apr 2025 07:39:18 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Troubleshooting/How-to-troubleshoot-missing-Topic-metrics-from-Apache-Kafka/ta-p/273203</guid>
      <dc:creator>Lefteris</dc:creator>
      <dc:date>2025-04-14T07:39:18Z</dc:date>
    </item>
  </channel>
</rss>

