redpanda-data / kminion

KMinion is a feature-rich Prometheus exporter for Apache Kafka written in Go. It is lightweight and highly configurable so that it will meet your requirements.
MIT License
620 stars 122 forks source link

List offsets for Stable consumer groups only #102

Closed amuraru closed 3 years ago

amuraru commented 3 years ago

Reduce the number of metrics for clusters where lots are consumer groups are short-lived and empty. The proposed change is to list the consumer group offsets only for Stable groups.

weeco commented 3 years ago

I think that's not desired for a lot of users as they use consumer group lags to monitor for potential issues (e.g. because the consuming application is no longer alive).

amuraru commented 3 years ago

That can be a right usecase, I agree. Would it make sense to make this optional to define a list of group states for which thr offsets are reported? Default all.

again - in our environment there are lots of short lived cg and lots of low value metrics reported for them

weeco commented 3 years ago

Hmm I'm unsure.

I'd like to figure out what requests exactly take too long with the consumer groups. Maybe all issues are solved if you use the offsetsTopic as scrape mode? The largest clusters I tested against had ~400 consumer groups and it was okayish (3-5s request duration) for describing the consumer groups.

amuraru commented 3 years ago

Agree - the scrape time is one dimension the other is the amount of metrics scraped by prometheus.

The overall time decreased when applying https://github.com/cloudhut/kminion/pull/101 patch so that would be something you could check please

let's give this PR more thought - I agree

amuraru commented 3 years ago

Closing - will address this more generically in https://github.com/cloudhut/kminion/issues/108