日期:2014-05-16  浏览次数:20819 次

Jconsole监控远程Linux的Kafka
1、配置启动参数:
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port={port to access}
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
-Djava.rmi.server.hostname={optional, allow what ip to access this Tomcat}

vi kafka-run-class.sh
在KAFKA_JVM_OPTS中追加上面的参数(参照图片)
-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9999 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false


2、hostname命令查看,和hostname -i查看

3、打开Jconsole输入service:jmx:rmi:///jndi/rmi://11.11.11.11:9999/jmxrmi


参考:
http://www.mkyong.com/tomcat/jconsole-jmx-remote-access-on-tomcat/
http://blog.csdn.net/cyq1984/article/details/5766776
http://linux.ccidnet.com/art/302/20080326/1401805_1.html
http://www.51testing.com/html/38/113838-132703.html