Consumer group metrics using JMX

We are using Confluent Platform and using JMX to expose metrics. But looks like by default it is not exposing consumer group metrics.
Any guidance on this?

hey @sandeep

did you check the following


Hi @mmuehlbeyer

Yes i have seen this documentation and enabled confluent.consumer.lag.emitter.enabled to true, however do not see any metrics coming, found some error in logs:
[2024-01-11 01:33:14,849] INFO Updated lag of 1 groups, ignored 0 rebalancing groups, failed to update 0 groups due to errors, and expired 0 groups. (kafka.metrics.ConsumerLagEmitter)

I see that in Kafka.yml we dont have any mention about consumerlag and we may need to enable it from mbeans link provided in documentation. Trying to figure our the regex pattern to enable it in kafka.yml file and see if it helps.
Advise on your thoughts.

Thank You,

Hi @sandeep
we have a open request for adding this mbean to jmx monitoring stack.
Please check the updates

Thank You @hifly81 , It would be great if they add it.

@sandeep bear in mind that with this addition, it is not anymore required to install kafka-lag-exporter, instead consumer lag will be available with a new mbean

1 Like

Yes @hifly81 We are looking for same implementation, we don’t want to add one more component for consumer lag metrics again.

Doesn’t require to install Kafka Lag exporter for the metrics “Kafka Lag Partition Metrics (Kafka Partition Earliest/Latest offset)” too?. Please confirm.

could you print the exact mbean name for it?

These are the metrics, not sure about respective Mbean for these:
kafka_partition_earliest_offset and Kafka_partition_latest_offset

@hifly81 We got this working, we enabled consumer lag properties for kafka and then add the regex in jmx kafka.yml. Now I can see the metrics exposed. Thank you.