JMX配置设置
本节介绍了如何为内部安装的JMX进行设置。
默认的JMX设置
在设置JMX时,VisualVM 和JConsole 等可视化工具可用于监测Frontline Command Center的系统性能。
要设置JMX,请导航到FRONTLINE_HOME
目录,编辑frontline
.xml。
将参数修改为以下内容。
<arguments>-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath="%BASE%" -Xms1024m -Xmx1024m -Dfile.encoding=UTF-8 -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=XXXX -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -jar "%BASE%\frontline.jar"</arguments>
重新启动 服务,通过JConsole进行连接。
配置
默认启用JMX
-Dcom.sun.management.jmxremote
设置访问JMX的端口
-Dcom.sun.management.jmxremote.port=XXXX
启用或禁用SSL配置
-Dcom.sun.management.jmxremote.ssl=false
启用或禁用访问JMX的认证
-Dcom.sun.management.jmxremote.authenticate=false
认证
本节介绍如何配置用户的认证。创建一个jmxremote.password
文件,内容为:。
monitorRole QED
controlRole R&D
创建另一个文件jmxremote.accesswith
。
monitorRole readonly
controlRole readwrite
用这些命令改变对jmxremote.password
和jmxremote.access
文件的访问。
cacls jmxremote.password /P “your_username”:R
cacls jmxremote.access /P “your_username”:R
把你的用户名
改为服务启动的首选用户。 然后在frontline
.xml内添加路径。
-Dcom.sun.management.jmxremote.access.file=path_to\jmxremote.access
-Dcom.sun.management.jmxremote.password.file= path_to\jmxremote.password
通过打开属性文件为Frontline 服务设置一个用户。将用户设置为可以访问 jmxremote.password
文件的人。