You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 17, 2024. It is now read-only.
In my app each consumer gets unique generated client_id. When I restart all consumers, Kafka assigns partitions to their new client_ids, but kafka_consumergroup_group_lag metrics for old client_ids remain in the output until I restart kafka-lag-exporter.
The graph below shows stacked values of kafka_consumergroup_group_lag for each client_id on the first start, after restart of consumers, and then after restart of kafka-lag-exporter:
The prometheus query is:
sum(kafka_consumergroup_group_lag) by (client_id)
The text was updated successfully, but these errors were encountered:
Thanks for trying out the project @aikoven. The client_id is generated by Kafka clients (by default) and is used to differentiate different Kafka clients. You probably want to aggregate on the group label, which is the same group.id you specify in your Kafka consumer properties configuration.
I see. Yes, this is also a problem for old consumer groups that no longer exist. When a metric is set for a particular set of labels it will remain on the prometheus endpoint until it's explicitly unset. The fix would be for the exporter to either reset all metrics each reporting interval, or determine how to selectively unset metrics that are no longer valid according to information retrieved from the consumer group coordinator.
In my app each consumer gets unique generated
client_id
. When I restart all consumers, Kafka assigns partitions to their newclient_id
s, butkafka_consumergroup_group_lag
metrics for oldclient_id
s remain in the output until I restartkafka-lag-exporter
.The graph below shows stacked values of
kafka_consumergroup_group_lag
for eachclient_id
on the first start, after restart of consumers, and then after restart ofkafka-lag-exporter
:The prometheus query is:
The text was updated successfully, but these errors were encountered: