1)安裝zabbix_java_gateway
2)配置zabbix_java_gateway配置文件和zabbix_server配置文件,指定監聽端口,啓動進程數
3)編輯Tomcat配置文件,開啓JMXjava如下操做到zabbix WEB UI界面
4)添加host,指定JMX interface
5)連接TOMCAT模板tomcat
yum install -y zabbix-java-gatewaypost
vi /etc/zabbix/zabbix_java_gateway.conf
定義LISTEN_IP LISTEN_PORT 和 START_POLLERS
spa
vi /etc/zabbix/zabbix_server.conf
定義 JavaGateway 和 JavaGatewayPort 和 StartJavaPollers
rest
啓動zabbix-java-gateway服務 systemctl start zabbix-java-gateway
重啓zabbix-server服務 systemctl restart zabbix-server 開啓JMX
server
vi /usr/local/tomcat/bin/catalina.sh #在#!/bin/sh下增長
export CATALINA_OPTS="$CATALINA_OPTS -Dcom.sun.management.jmxremote -Djava.rmi.server.hostname=192.168.19.129 -Dcom.sun.management.jmxremote.port=9999 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false"
進程
重啓tomcat (兩步曲):/usr/local/tomcat/bin/shutdown.sh
/usr/local/tomcat/bin/startup.shssl
Configuration -> Hosts -> Create host
Agent interfaces -> remove
JMX interfaces -> Add -> 本機地址 9999
Templates -> Select -> Template App Apache Tomcat JMX -> select -> Add
Addrem