Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kafka exporter should give the possibility to exclude topic #103

Closed
nicolasblaye opened this issue May 7, 2019 · 1 comment
Closed

kafka exporter should give the possibility to exclude topic #103

nicolasblaye opened this issue May 7, 2019 · 1 comment

Comments

@nicolasblaye
Copy link

I tried to use kafka_exporter on my newly created kafka. We have 3 brokers with only a handful of consumers. Because of that, not every partition is used in the __consumer_offsets topic. When I try to get the metrics, it takes a lot of time because it tries to connect to every partition leader and fails for the empty one with

ERRO[0081] Cannot get leader of topic __consumer_offsets partition 31: kafka server: In the middle of a leadership election, there is currently no leader for this partition and hence it is unavailable for writes.  source="kafka_exporter.go:275"
ERRO[0083] Cannot get current offset of topic __consumer_offsets partition 31: kafka server: In the middle of a leadership election, there is currently no leader for this partition and hence it is unavailable for writes.  source="kafka_exporter.go:284"
ERRO[0085] Cannot get oldest offset of topic __consumer_offsets partition 31: kafka server: In the middle of a leadership election, there is currently no leader for this partition and hence it is unavailable for writes.  source="kafka_exporter.go:296"

I saw that we can filter topic we want to listen to, using a regex, so I tried --topic.filter='^(?!__consumer_offsets).*$', but this is not go regex syntax so it failed with invalid or unsupported Perl syntax: (?!

It could be nice to instead have an exclusion mechanism, or to have a workaround for empty partition with no leader.

@danielqsj
Copy link
Owner

thanks, closed by #379

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants