Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to expose kafka metrics to /actuator/metrics with spring boot 2

I was looking a while and didn't seem to find the answer. I'm using Spring boot 2, Spring Kafka 2.1.4 and I want to see the kafka consumer metrics in the /metrics endpoint of spring boot actuator. What I don't understand is - should I implenemt the exposure myself or is this comes out-of-box in boot 2 ?

If I to implement this my self, what is the best way to do it?

like image 697
Michael Azimov Avatar asked Mar 27 '18 07:03

Michael Azimov


1 Answers

add this config works for me:

spring.jmx.enabled=true
like image 114
ThinkAlone Avatar answered Sep 18 '22 18:09

ThinkAlone