zabbix based on JMX monitoring tomcat

Java gateway configuration:

cd / usr / local / zabbix / sbin / zabbix_java / // into the path

 

 vim settings.sh // modify files

 

 vim /usr/local/zabbix/etc/zabbix_server.conf // modify the file, add the last line

JavGateway=127.0.0.1
JavGatewayPort=10052
StartJavaPollers=5

 

 sh /usr/local/zabbix/sbin/zabbix_java/startup.sh // startup script

netstat -anpt | grep 10052 // 10052 View port status, successful start

 

 Installation tomcat:

java -version

 

 which java

tar xf apache-tomcat-8.5.16.tar.gz

mv apache-tomcat-8.5.16 /usr/local/tomcat/

 

Modify the tomcat startup script

vim /usr/local/tomcat/bin/catalina.sh

 

CATALINA_OPTS="$CATALINA_OPTS
-Dcom.sun.management.jmxremote
-Docom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
-Djava.rmi.server.hostname=192.168.96.4

 

 

 

 Start tomcat;

/usr/local/tomcat/bin/catalina.sh start

 

 netstat -anpt | grep LISTEN | grep java

 

 Zabbix_web side configuration:

Adding JMX information:

Configuration - Host --server. zabbix. com--

 

 

 Import Template:

Configuration - Templates - Import Template

 

 

 

 Adding template for server.zabbix.com:

Host --server.zabbix.com-- template - add - Update

 

 

 

 

 

 

 

Guess you like

Origin www.cnblogs.com/XXXX001/p/11791371.html