quarkusio / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
13.78k stars 2.68k forks source link

Drop jolokia from JVM mode Docker as our monitoring strategy is around Prometheus #2098

Closed rsvoboda closed 5 years ago

rsvoboda commented 5 years ago

Drop jolokia from JVM mode Docker as our monitoring strategy is around Prometheus

docker run -i --rm -p 8080:8080 quarkus/getting-started-jvm
exec java -Dquarkus.http.host=0.0.0.0 -javaagent:/opt/agent-bond/agent-bond.jar
  =jolokia{{host=0.0.0.0}},jmx_exporter{{9779:/opt/agent-bond/jmx_exporter_config.yml}} 
  -XX:+UseParallelGC -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 
  -XX:MinHeapFreeRatio=20 -XX:MaxHeapFreeRatio=40 -XX:+ExitOnOutOfMemoryError
  -cp . -jar /deployments/app.jar

Jolokia comes via https://github.com/fabric8io-attic/base-images/blob/master/java/images/jboss/openjdk8/jdk/Dockerfile

gsmet commented 5 years ago

@rsvoboda AFAICS, it's still an issue with https://github.com/quarkusio/quarkus/pull/2105 .

rhuss commented 5 years ago

fyi, the next version of the fabric8 base images get rid of agent-bond (which combines jolokia & prometheus agents) and goes back to offering two individual agents which can be switched off/on individually via environment variables.

The canonical repository for the fabric8 images is since quite some time (>2 years): https://github.com/fabric8io-images/java where different flavours and combinations are offered (alpine, centos), (jdk/jre), (7/8/11). If using these images I highly recommend switching to this repositories as this is still maintained e.g. with respect to JVM updates. Also happy to craft this image to the specific needs for Quarkus.

Said that some Java upstream base images with Prometheus included and which also runs nicely on OpenShift (e.g. with its restrictions wrt/ file permissions) should probably available on Docker Hub, too. But I can't find that location. Maybe @jmtd can help ?

jmtd commented 5 years ago

Said that some Java upstream base images with Prometheus included and which also runs nicely on OpenShift (e.g. with its restrictions wrt/ file permissions) should probably available on Docker Hub, too. But I can't find that location. Maybe @jmtd can help ?

Sorry late response, I am not aware of a community java image with prometheus baked in although one may exist. This has been useful for me though in terms of planning the direction of openjdk/openjdk-11-rhel7 (etc) images. Thanks for looping me in