SpringBoot、JConsole 和 Zabbix

SpringBoot、JConsole 和 Zabbix

我正在嘗試使用 JMX 和 Zabbix 來監視我的 SpringBoot 應用程式。我添加到我的應用程式

-Dcom.sun.management.jmxremote.password.file= path to jmx.password
-Dcom.sun.management.jmxremote.access.file=path to jmx.access
-Dcom.sun.management.jmxremote
-Djava.rmi.server.hostname=host ip
-Dcom.sun.management.jmxremote.port=64355
-Dcom.sun.management.jmxremote.rmi.port=64355
-Dcom.sun.management.jmxremote.authenticate=true
-Dcom.sun.management.jmxremote.ssl=true
-Dcom.sun.management.jmxremote.ssl.need.client.auth=true
-Dcom.sun.management.jmxremote.registry.ssl=true
-Djavax.net.ssl.keyStore="path to keystore"
-Djavax.net.ssl.keyStorePassword=keystore password
-Djavax.net.ssl.trustStore="path to truststore"
-Djavax.net.ssl.trustStorePassword=truststore password

當我嘗試使用服務 URL 執行 Zabbix jmx 代理程式時 service:jmx:rmi:///jndi/rmi://hostIP:64355/jmxrmi 我有一個錯誤

non-jrmp server at remote endpoint

在 zabbix_java_gateway.log 中

如果我設定 hostIP:64355 我有

 Service URL must start with service:jmx:

當我嘗試從JConsole 連接時,我遇到與Zabbix 中相同的service:jmx:rmi:///jndi/rmi://hostIP:64355/jmxrmi 錯誤,但是我將hostIP:64355 放入“遠端進程”字段,一切都好

答案1

Zabbix 無法透過 TLS 處理 RMI 登錄。使用目前版本的 Zabbix設定-Dcom.sun.management.jmxremote.registry.ssl=false-Dcom.sun.management.jmxremote.ssl=true應獲得盡可能多的加密。

相關內容