title: Kafka consumer lag through JMX
body: <p>I'm trying to monitor the lag of a consumer group in Kafka 0.10.</p>
  
  <p>Our consumers are keeping track of their offsets in Kafka rather than ZooKeper. This means I can get the figures using the following:</p>
  
  <pre><code>bin/kafka-consumer-groups.sh --bootstrap-server &lt;broker&gt; --describe --group &lt;group-name&gt;
  </code></pre>
  
  <p>This works fine. However, my broker already makes use of the <a href="https://github.com/prometheus/jmx_exporter" rel="nofollow noreferrer">Prometheus JMX exporter</a> for collecting a number of stats. I've connected JConsole to the brokers but can't see the same data being reported in JMX as reported by <code>kafka-consumer-groups.sh</code>.</p>
  
  <p>Is there anyway to get this information from Kafka with JMX <em>without</em> needing any additional tools?</p>