kafka_exporter icon indicating copy to clipboard operation
kafka_exporter copied to clipboard

consumergroupLag may be negative

Open panszobe opened this issue 3 years ago • 2 comments

The current master branch may get negative consumergroupLag because it runs getConsumerGroupMetrics func after getTopicMetrics func. In fact, this problem has always existed.

As we know, consumer action falls behind producer action, the current offset committed may be bigger than newest offset got before when runs getConsumerGroupMetrics func after getTopicMetrics func, which will cause the metrics is not correct, and we could not know the negative value means something wrong or means no lag.

To solve this, suggest that we can run getConsumerGroupMetrics firstly, and then run getTopicMetrics.

panszobe avatar Dec 08 '21 03:12 panszobe

i have the same problem. any progress?

kafka_consumergroup_lag{namespace="namespace", consumergroup="group", topic="topicname", strimzi_io_cluster="cluster-name"} < 0

image

sorushsaghari avatar Feb 14 '23 07:02 sorushsaghari

Hello

We are getting a no Kafka lag metrics every hour and a half and think this could be related, since the value comes back

This Is impacting alerting Is there any workaround?

joncashe avatar May 31 '23 11:05 joncashe