Hi Marios,
do you know why Lenses sends so many JMX requests against MSK?
We’re seeing a high volume of JMX traffic from Lenses to the MSK cluster and want to understand whether this is expected behavior, configurable polling, or possibly something misconfigured on our side.
Hi, yes, this can happen, and it is usually related to the broker metrics refresh interval.
Lenses collects broker metrics on a configurable interval via:
lenses.interval.metrics.refresh.broker
The default is around 5 seconds, which can be quite aggressive for MSK. For MSK, it is recommended to increase this interval to at least 30 seconds, or potentially higher depending on the size of the cluster and the number of exposed metrics.
The reason is that MSK exposes metrics via OpenMetrics/Prometheus, backed by jmx_exporter behind the scenes. Kafka brokers can expose a very large number of JMX metrics, sometimes hundreds of thousands, and scraping them too frequently can become slow and expensive.
So this is expected behavior rather than necessarily a misconfiguration, but the polling interval should be tuned for MSK environments.
Configuration Reference | Lenses Docs
I will configure the setting. Thanks for the support !