Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How to realize remote Monitoring of docker Container Operation by jconsole+jmx

Shulou Source: shulou.com Published: 2022-06-02 09:18:30 10月04日 Update

This article introduces the knowledge of "how to remotely monitor the operation of docker containers by jconsole+jmx". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

Dockerfile configuration RUN mkdir / usr/local/secret-jmxEXPOSE 20019CMD java-Xmx1024m-Xms256m\-Djava.rmi.server.hostname='1.2.3.4'\-Dcom.sun.management.jmxremote.port=20019\-Dcom.sun.management.jmxremote.rmi.port=20019\-Dcom.sun.management.jmxremote=true\-Dcom.sun.management.jmxremote.authenticate=true\-Dcom.sun.management.jmxremote.ssl=false\-Dcom.sun.management.jmxremote.local.only=false \-Dcom.sun.management.jmxremote.password.file=/usr/local/secret-jmx/jmxremote.password\-jar. / ${JAR_FILE_NAME}-- spring.profiles.active=dev

Note:

Specifies that the EXPOSE port number is consistent with the jmx configuration

The hostname here refers to the public network ip of the host.

Jmxremote.rmi.port needs to be specified

Note that the permission of jmxremote.password should be set to 600.

Run dockerdocker run-itd-p 20019-name test-tools-dev- v / home/test/secret/jmx:/usr/local/secret-jmx-- restart=always test-tools-dev-image

Note the volume settings

This is the end of the content of "how to remotely monitor the operation of docker containers by jconsole+jmx". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Tags: Situation operation container remote monitoring monitoring content more knowledge configuration practicality consistency achievement of learning next slogan dilemma reality host host article permission Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info Huawei Linux Apple OPPO Reno