- https://mvnrepository.com/artifact/io.prometheus.jmx/jmx_prometheus_javaagent/0.12.0 下载 jmx_prometheus_javaagent-0.12.0.jar
- 参考 https://github.com/prometheus/jmx_exporter/blob/master/example_configs/tomcat.yml 配置 jmx_exporter.yml
- 配置 JAVA_OPTS
-javaagent:/your/path/to/jmx_prometheus_javaagent.jar=2112:/your/path/to/jmx_exporter.yml
运行 java 程序,通过 2112 端口查看 JVM 信息