1.配置jmx
编辑catalina.sh,加入如下配置( tomcat/bin 目录下 )
CATALINA_OPTS="
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
-Djava.rmi.server.hostname=172.17.101.178"
zabbix开启监控java功能
2.agent上配置zabbix_java (抓取agent上tomcat的jmx的数据)
方法1:在zabbix的安装包里面(源码)
./configure --enable-java --prefix=/opt/zabbix_java
make && make install
方法2:
#rpm -ivh http://repo.zabbix.com/zabbix/2.2/rhel/6/x86_64/zabbix-release-2.2-1.el6.noarch.rpm
# yum -y install zabbix-java-gateway
agent
vim /opt/zabbix_java/sbin/zabbix_java/settings.sh
LISTEN_IP="0.0.0.0"
LISTEN_PORT=10052
PID_FILE="/tmp/zabbix_java.pid"
START_POLLERS=5
3.server配置
#vim /usr/local/zabbix/etc/zabbix_seerver.conf
JavaGateway=127.0.0.1
JavaGatewayPort=10052
StartJavaPollers=5
4.启动java-gateway
# /etc/init.d/zabbix-java-gateway start
5.web配置