1.编译
cd zabbix-2.2.6
./configure --with-mysql --with-net-snmp --with-libcurl --enable-server --enable-agent --enable-proxy --enable-java --prefix=/usr/local/zabbix/
make && make install
2.修改配置
vi /usr/local/zabbix/zabbix_java/sbin/zabbix_java/settings.sh
LISTEN_IP="0.0.0.0"
LISTEN_PORT=10052
START_POLLERS=5
vi /usr/local/zabbix/etc/zabbix_server.conf
JavaGateway=127.0.0.1
JavaGatewayPort=10052
StartJavaPollers=5
3.启动服务
cd /usr/local/zabbix/zabbix_java/sbin/zabbix_java
./startup.sh
4.Tomcat配置
export CATALINA_OPTS="$CATALINA_OPTS
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=12345
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false"
5.添加模板
6.监控不能获取Tomcat数据
修改模板参数
jmx["Catalina:type=GlobalRequestProcessor,name=http-8080",bytesReceived] 改成
jmx["Catalina:type=GlobalRequestProcessor,name=\"http-bio-8080\"",bytesReceived]
jmx["Catalina:type=Manager,path=/,host=localhost",maxActive]改成
jmx["Catalina:type=Manager,context=/,host=localhost",maxActive]
7.监控其他参数
使用jconsole连接tomcat
借鉴模板格式添加相应监控项