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

Very slow getting metrics from jmx_exporter #79

Open
cloud-66 opened this issue Jul 8, 2022 · 5 comments
Open

Very slow getting metrics from jmx_exporter #79

cloud-66 opened this issue Jul 8, 2022 · 5 comments

Comments

@cloud-66
Copy link

cloud-66 commented Jul 8, 2022

Using this jmx_exporter config https://github.com/confluentinc/jmx-monitoring-stacks/blob/6.1.0-post/shared-assets/jmx-exporter/kafka_broker.yml
Get metrics from url takes 3 minutes !
How it is possible to use by anyone for any cluster? In what case could it be used?
This is very heavy config.
May I have to disable topic metrics.
Maybe I have to many topics and consumers for this exporter
kafka 2.7.2
2000 topics
40000 partitions
644 consumer groups (not all active)

Which metrics should I disable from this configuration first?

@jeqo
Copy link
Contributor

jeqo commented Aug 25, 2022

Yeah, some metrics are labeled by topic and partitions, so multiply 40K * metrics labeled by partitions, and it's a pretty large dataset to load and export.
This tend to be a CPU intensive task. It could help to add some CPU to get this latency down.

I'd suggest to filter out metrics labeled by partition to reduce the amount of metrics to collect.
Another alternative is to enable cache on JMX rules: https://github.com/prometheus/jmx_exporter#configuration, though not sure how much this will reduce this latency.

If you find any workaround, please share it back if possible. It could be possible to add it the repo. Thanks!

@zyxep
Copy link

zyxep commented Nov 1, 2022

did you find a solution @cloud-66 ?
i am in similar position, the generation of /metrics is so slow the timeout has to be insanely high and then the whole point is gone with metrics. imo.

@cloud-66
Copy link
Author

cloud-66 commented Nov 17, 2022

@zyxep No.
It is imposible to use jmx metrics for me because of slow, so i use this exporter which is working using kafka admin api

@zyxep
Copy link

zyxep commented Dec 6, 2022

@zyxep No. It is imposible to use jmx metrics for me because of slow, so i use this exporter which is working using kafka admin api

what are your times then?

@dhoard
Copy link
Contributor

dhoard commented Nov 30, 2023

@cloud-66 as @jeqo pointed out the cardinality is huge for everything. Are using using the JMX Exporter v0.20.0? (latest release in this repo)

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

4 participants