SpringBoot JMX with hawtio/jolokia

877 views
Skip to first unread message

cmou...@redhat.com

unread,
Nov 15, 2016, 12:14:28 PM11/15/16
to fabric8
Hi,

Is there a specific SpringBoot jar file to be added to the pom.xml file to see the SB or Tomcat JMX Mbeans exposed by Jolokia - https://www.dropbox.com/s/oozqjs162boidt8/Screenshot%202016-11-15%2016.47.22.png?dl=0 when SB runs as a pod ?

Charles

Antonin Stefanutti

unread,
Nov 15, 2016, 12:25:47 PM11/15/16
to cmou...@redhat.com, fabric8
Hi Charles,

Have you check you have the spring-boot-starter-actuator JAR? See http://docs.spring.io/spring-boot/docs/current/reference/html/production-ready-jmx.html.

You can take a look at the https://github.com/fabric8-quickstarts/spring-boot-camel-rest-sql/ POM, for which you get the following view in the JVM console when deployed on OpenShift:


Antonin

--
You received this message because you are subscribed to the Google Groups "fabric8" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fabric8+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Alexandre Briani Kieling

unread,
Nov 15, 2016, 7:06:27 PM11/15/16
to Antonin Stefanutti, cmou...@redhat.com, fabric8
+1,

You need to add a dependency to Spring Boot Actuator to enable JMX and a dependency to Jolokia.

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

Have a look at the camel-example-spring-boot-metrics example project.

Cheers,
Alexandre Kieling



To unsubscribe from this group and stop receiving emails from it, send an email to fabric8+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "fabric8" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fabric8+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages