5.24-zabbix监控Tomcat

监控流程:

1)安装zabbix_java_gateway
2)配置zabbix_java_gateway配置文件和zabbix_server配置文件,指定监听端口,启动进程数
3)编辑Tomcat配置文件,开启JMX
4)添加host,指定JMX interface
5)链接TOMCAT模板

安装zabbix_java_gateway

yum install -y zabbix-java-gateway

修改配置文件

vi /etc/zabbix/zabbix_java_gateway.conf 
	定义 LISTEN_PORT 和 START_POLLERS

vi /etc/zabbix/zabbix_server.conf
	定义 JavaGateway 和 JavaGatewayPort 和  StartJavaPollers

启动zabbix-java-gateway服务 systemctl start zabbix-java-gateway

重启zabbix-server服务 systemctl restart zabbix-server

开启JMX

vi /usr/local/tomcat/bin/catalina.sh #在#!/bin/sh下增加
export CATALINA_OPTS="$CATALINA_OPTS -Dcom.sun.management.jmxremote
-Djava.rmi.server.hostname=192.168.222.128
-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.sh	

添加Host链接模板

Configuration -> Hosts -> Create host
Agent interfaces -> remove
JMX interfaces -> Add -> 192.168.222.128  9999
Templates -> Select -> Template App Apache Tomcat JMX -> select -> Add
Add

你可能感兴趣的:(5.24-zabbix监控Tomcat)