英文:
Can we collect Kafka Metrics without JMX
问题
我对Kafka相当新,并且正在探索收集Kafka指标的方法。在我的探索中,我能够通过JMX和Jconsole收集指标,但问题是由于某些原因,我不允许启用JMX端口,所以根据我的理解,使用Prometheus或Grafana的前景被排除了。现在我在思考是否有另一种方法可以在不使用JMX的情况下收集指标,例如使用REST API或其他方法。我还研究了Kafka REST代理,它是否可以帮助我在这种情况下收集指标(我可以使用它来收集指标)。
感谢任何帮助。
英文:
I am fairly new to kafka and was exploring on collecting kafka metrics. In my exploring I was able to collect the metrics with help of JMX and Jconsole but the thing is due to some reason I am not allowed to enable JMX port so the prospect of using prometheus or grafana is out as per my understanding. Now I was wondering if there is another way of collecting the metrics without using JMX with the help of REST Api or something. I also looked into kafka-rest proxy will it help me in this case (Can I collect metrics with it).
Any help is appreciated.
答案1
得分: 1
Prometheus JMX Exporter 和 Jolokia 都需要连接到本地的 JMX 端口,然后暴露一个 REST API。
如果您无法连接到该端口(例如,您无法访问代理服务器),那么没有其他替代方法。
REST 代理是用于 Kafka 客户端功能的,而不是用于代理指标(它有自己的 JMX 指标)。
英文:
Promethus JMX Exporter and Jolokia both require connecting to the local JMX port, then exposing a REST API
If you can't connect to that port (for example, you don't have access to the broker servers), then no, there's no alternative.
The REST Proxy is for Kafka client functions, not for broker metrics (it has its own JMX metrics)
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论