Zabbix's JMX monitoring architecture
Zaibbix Server-->java gateway-->jmx Counter
Server-side:
Install JMX: can be installed on any server, this time installed on the server side; # yum -y install zabbix-java-gateway# systemctl status zabbix-java-gateway.service Modifying the Java-gateway configuration file # vim /etc/zabbix/ zabbix_java_gateway.conf # Listening address listen_ip= "0.0.0.0" # Listening Port listen_port=10052 # pid_ File files pid_file= "/var/run/zabbix/zabbix_java.pid" # Number of worker threads opened START_POLLERS=50 # time-out Timeout=3 Start zabbix-java-gateway: # systemctl start zabbix-java-gateway.service # ss -tnl | grep 10052 LISTEN 0 50 *:10052 *:* Modify zabbix_server configuration file and restart # vim / etc/zabbix/zabbix_server.conf #修改下面几个参数: IP address of the server where the # javagateway is located javagateway=192.168.20.59 # javagateway Service Port JavaGatewayPort=10052 # number of processes from Javagateway data acquisition startjavapollers=5 configuration file modification, Restart zabbix-server: # systemctl restart Zabbix-server.service Note: The start_pollers parameter of the Java-gateway configuration file >= zabbix_server The Startjavapollers parameter of the configuration file
Client:
Add parameters to JMX in Tomact: Configure at the beginning of the file. # vim $tomcat/bin/catalina.sh catalina_opts= "$CATALINA _opts-dcom.sun.management.jmxremote-dcom.sun.managem ent.jmxremote.port=12345 # JMX Port, default 12345-dcom.sun.management.jmxremote.authenticate=false-dcom.sun.mana gement.jmxremote.ssl=false-djava.rmi.server.hostname=192.168.20.60 "# Native IP
GUI side:
Import template to Zabbix, and associate to host, add monitor new host, configure JMX interface, default port number 12345;
Import JMX template selection Configuration: Host-Templates-select-Templates-: Template app Apache Tomcat jmx template app Generic java jmx
To see if JMX is in effect, restart the Tomcat process and Zabbix-java-gateway service Configuration------and see if the JMX that corresponds to the server is turned green;
View graphics Monitoring--Graphs Select the corresponding host,graph select Threads,[object Object]
Zabbix-java-gateway Monitoring Tomcat