JMX参数配置

mac2024-03-15  21

JMX Prometheus Exporter配置示例:

export DN_OPTS="-Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl= false -Dcom.sun.management.jmxremote.local.only=true -Dcom.sun.management.jmxremote.host=${bind_ip} - Dcom.sun.management.jmxremote.port=19007 -Dcom.sun.management.jmxremote.rmi.port=19007 -javaagent:/ho me/hkx/hadoop/prometheus/jmx_prometheus_javaagent-0.12.1-SNAPSHOT.jar=9007:/home/hkx/hadoop/prometheu s/datanode.yaml "

具体说明:

-Dcom.sun.management.jmxremote.authenticate=false #不开启鉴权 -Dcom.sun.management.jmxremote.ssl=false #不开启ssl -Dcom.sun.management.jmxremote.local.only=true #只接受本地连接 -Dcom.sun.management.jmxremote.host=${bind_ip} #jmx绑定指定地址,默认绑定到所有地址 -Dcom.sun.management.jmxremote.port=19006 #jmx绑定端口 -Dcom.sun.management.jmxremote.rmi.port=19006 #rmi绑定端口,可以与jmx端口一致 -Djava.rmi.server.hostname=${bind_ip} #rmi地址无需绑定(经测绑定后会取不到进程指标) -XX:+DisableAttachMechanism #禁用attach功能,无需配置(此端口不能指定,但是只有本机才能连,应该是安全的)

 

最新回复(0)