1. Install tomcat and jdk
Tomcat and jdk installed on server2 (agent client) and open the tomcat:
rpm -ivh jdk-8u121-linux-x64.rpm
tar zxf apache-tomcat-8.5.24.tar.gz -C /usr/local/
cd /usr/local/
ln -s apache-tomcat-8.5.24 tomcat
vim /usr/local/tomcat/bin/catalina.sh #向tomcat中添加JMX的参数
CATALINA_OPTS='-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=8888 #监听端口号,方便远程访问
-Dcom.sun.management.jmxremote.ssl=false #是否对连接开启SSL加密,默认开启
-Dcom.sun.management.jmxremote.authenticate=false' #是否需要开启用户认证,默认开启
Supplementary: JMX stands for Java Management Extensions, provides management extensions for Java applications
cd tomcat/
cd bin/
./startup.sh #启动tomcat
2. Installation zabbix-java-gateway
server1 (server side) mounted zabbix-java-gateway, and configured accordingly:
yum install zabbix-java-gateway-4.4.1-1.el7.x86_64.rpm -y
systemctl start zabbix-java-gateway
netstat -antlp | grep 10052
vim /etc/zabbix/zabbix_server.conf
288 JavaGateway=172.25.254.1
296 JavaGatewayPort=10052
304 StartJavaPollers=5
systemctl restart zabbix-server
3.zabbix monitoring interface accordingly provided
step1 configuration - host -server2
step2 JMX interfaces - Update
step3 configuration - host - Templates - unlink and clean
step4 configuration - host - Templates - Add -Java JMX- update
step5 view server2 this time JMX icon is gray
step6
vim /etc/zabbix/zabbix_java_gateway.conf
9 LISTEN_IP="172.25.254.1"
17 LISTEN_PORT=10052
35 START_POLLERS=5
systemctl restart zabbix-java-gateway
step7 Refresh - Check to server2 this time JMX icon is green