fabric8io / fabric8

fabric8 is an open source microservices platform based on Docker, Kubernetes and Jenkins
http://fabric8.io/
1.76k stars 504 forks source link

support spring boot actuator services on dashboard #1686

Open jstrachan opened 10 years ago

jstrachan commented 10 years ago

see https://github.com/spring-projects/spring-boot/tree/master/spring-boot-actuator

would be good to be able to poll metrics and provide hawtio support etc

hekonsek commented 10 years ago

Hi James,

Can you assign this to me? It was on my roadmap anyway :-)

Cheers.

jstrachan commented 10 years ago

all yours thanks!

I thought it might be nice to make the spring boot actuator as a separate profile folks can add/remove (adding by default sounds good though ;)

BTW I was gonna do the same thing with the insight-log4j stuff; make it an optional profile you can add/remove more easily on a per profile basis. I was gonna experiment with using the maven fabric8 plugin to automatically add all the transitive dependencies; I'll give you a shout if I get it working...

jstrachan commented 10 years ago

am hoping once we've an example using the actuator we can also auto-detect the health plugin in hawtio in jmx: https://github.com/hawtio/hawtio/issues/1377

hekonsek commented 10 years ago

I've just added Jolokia to Spring Boot container dependencies. Now all Spring Boot containers will have Jolokia enabled by default.

BTW I've just cloned Hawtio repository and decided to learn Angular to hack some Spring Boot container goodies. For example to add these actuator stuff to dashboard. It may take me some time, as I need to learn Angular in the first place.

hekonsek commented 10 years ago

@jstrachan I'll try to add Boot Actuator metrics to the dashboard of the Spring Boot container. Be prepared to many questions in coming days ;) .

jstrachan commented 10 years ago

@hekonsek looking forward to them ;)

jstrachan commented 10 years ago

BTW the java container tends to add jolokia by default as a Java agent via the java container properties: https://github.com/jstrachan/fabric8/blob/micro-service/fabric/fabric8-karaf/src/main/resources/distro/fabric/import/fabric/profiles/containers/java.profile/io.fabric8.container.java.properties#L17-17

if we add jolokia to the spring boot dependencies; does that cause it to startup twice? I wonder if we need to disable one of them?

hekonsek commented 10 years ago

I'll check of this Jolokia thing. However we need to remember that having Jolokia in POM allows folks to run microservice via mvn spring-boot:run on their local machines and connect to them with Hawtio. This is big plus - you don't have to start the service via process launcher to take the advantage of Hawtio awesomeness during local development. I'll verify this and think about the best approach.

jstrachan commented 10 years ago

yeah thats a good point. I'm cool with adding jolokia officially to spring boot in fabric8 as a real dependency (its got pretty modest dependencies too). Its more we should not add it twice to avoid confusion.

hekonsek commented 10 years ago

James, how exactly would you imagine Spring Boot support for Hawtio?

I would think about something like - after you connect to the process (via "Connect" hawtio option) we should detect if the process is Spring Boot one. If so, then we should add additional "Spring Boot" tab to the Hawt.io menu (near "Threads", "Tomcat", etc) and display Spring Boot specific stuff there (like actuator metrics). What do you think?

jstrachan commented 10 years ago

Agreed. e.g. a sub tab for visualising the beans in an application context would be good

hekonsek commented 10 years ago

Oh, we could create beans diagram similar to Camel routes diagram! This funny bouncing graph :) . Cool.

I'm front-end virgin, so I'm currently digging into Angular and JS in general. It may take a while before I commit something useful for Hawtio, but I'm determined to do so ;) As a starting point I would like to add this "Spring Boot" tab with "metrics".

jstrachan commented 10 years ago

Yeah! :) Even just a table would be pretty handy to start with

davsclaus commented 10 years ago

For table like plugins in hawtio, then some of the earlier ones I did was Tomcat / JBoss etc, they are fairly easier to do, although they reuse the jmx plugin which is a bit "magical". But they are a good start for a plugin with some sub tabs and some of those are tables showing data you grab from JMX / JMX MBeans.

hekonsek commented 10 years ago

Noted. Thanks Claus!