jmx_exporter
jmx_exporter copied to clipboard
Is there any mechanism to work with Prometheus SDK
As stated in the title, is there anyway to achieve this?
Our scenario: We are using Kafka Connect with JMX exporter, however, in our connect task, we would like to expose some extra customized metrics. What I managed to do is implement the MBeans and JMX exporter can successfully collect the data. But this is increasing a lot of complexity in the code base and we are wondering if we can use the Prometheus SDK to export those data instead and still have JMX exporter.
Thanks in advance!
Hi, I'm happy to help, but I need some more information on your usage of jmx_exporter
and the connect task. Is your connect task a Java program using jmx_exporter
as a "library", or do you use an unmodified version of jmx_exporter
and the connect task is an independent tool? Are you using jmx_exporter
as a Java agent, or as a standalone process connecting to Kafka over the network? And in which component did you implement you custom MBean?
Thanks for your response. We are using jmx_exporter
as a java agent without modifying it. Basically what we did is just download the jar file and specify the -javaagent
flag. At the moment we implemented the custom MBean in our Kafka connect code base.
@cuichenli What you are doing is the correct approach. I would not recommend trying interface with internal Prometheus classes instances.
Closing as stale. Please reopen if you would like to continue the discussion.