javaspring-bootjmxprometheusspring-jmx

JMX_exporter with Prometheus and Grafana


I have SpringBoot application and i want to implement jmx monitoring over it. I have successfully implement the monitoring on the services with prometheus counter, and for the machine with node_exporter. After that i have connected it with grafana. That is fine.

Now i want to get metrics with Jmx exporter but i found it difficult. I cannot get how to get metrics from JMX exporter. There is not so much stuff on net about this...

What i need to get the metrics? Start the JMX_exporter, change the prometheus config.yml?


Solution

  • When you have SpringBoot app, you can use SpringBoot actuator to get metrics. Just put the dependency of the SpringBoot Actuator.

    <dependency>
       <groupId>org.springframework.boot</groupId>
       <artifactId>spring-boot-actuator</artifactId>
    </dependency>