Experimental purpose: Zabbix monitoring tomcat
Experimental environment: zabbix2.4.4 tomcat6.0.4.1
Server side: Lamp+zabbix_server is already installed.
Client: Zabbix_agentd Tomcat is already installed.
Zabbix Server configuration: (Recompile zabbix_server)
Yum-y Install Java Java-devel
./configure--prefix=/usr/local/zabbix/--enable-server--enable-agent--with-mysql--with-net-snmp--with-libcurl-- WITH-LIBXML2--enable-java
Ls/usr/local/zabbix/sbin/zabbix_java
#查看编译--enable-java, the following 5 files will be successfully compiled
Bin Lib settings.sh shutdown.sh startup.sh
[Email protected] zabbix_java]# pwd
/usr/local/zabbix/sbin/zabbix_java
[[email protected] zabbix_java]# grep ^[^#] settings.sh//Modify Zabbix_java parameters as follows
9 listen_ip= "0.0.0.0"
listen_port=10052
Pid_file= "/tmp/zabbix_java.pid"
Start_pollers=5
vim/usr/local/zabbix/etc/zabbix_server.conf//Modify Zabbix_server configuration file
Logfile=/tmp/zabbix_server.log
Dbname=zabbix
94 Dbuser=zabbix
102 Dbpassword=xxxxxx
109 Dbsocket=/tmp/mysql.sock
198 javagateway=127.0.0.1
206 javagatewayport=10052
214 startjavapollers=5
Restart Zabbix_server
Service Zabbix_server Start
Start Zabbix_java_gateway//zabbix_java_gateway listen on port 10052
sh/usr/local/zabbix/sbin/zabbix_java/startup.sh
[Email protected] etc]# Netstat-antlp|grep 10052
TCP 0 0::: 10052:::* LISTEN 27929/java
Zabbix Client (Tomcat) configuration:
Yum-y Install Java Java-devel
wget Http://archive.apache.org/dist/tomcat/tomcat-8/v8.0.26/bin/extras/catalina-jmx-remote.jar
#下载tomcat对应的jmx版本放到 $tomcat/lib/
vim/usr/local/tomcat/bin/catalina.sh
Catalina_opts= "-dcom.sun.management.jmxremote-dcom.sun.management.jmxremote.authenticate=false- Dcom.sun.management.jmxremote.ssl=false-djava.rmi.server.hostname= Client IP "
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/74/AD/wKiom1Yl03DTxB7gAAIHxbuHJvc762.jpg "style=" float: none; "title=" 2.png "alt=" Wkiom1yl03dtxb7gaaihxbuhjvc762.jpg "/>
Restart Tomcat and Zabbix_agentd
Zabbix Service-Side testing
java-jar/usr/local/src/cmdline-jmxclient-0.10.3.jar-192.168.0.168:18090 java.lang:type=memory NonHeapMemoryUsage
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/74/A9/wKioL1Yl05iBnX_OAAGkC6tXgR0311.jpg "style=" float: none; "title=" 3.png "alt=" Wkiol1yl05ibnx_oaagkc6txgr0311.jpg "/>
, the data has been acquired
To import a template, add a host:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/74/AD/wKiom1Yl03Cgs9B7AAHR_qldC9Q686.jpg "style=" float: none; "title=" 4.png "alt=" Wkiom1yl03cgs9b7aahr_qldc9q686.jpg "/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/74/A9/wKioL1Yl05mC4ryKAAQA4hQ32b0344.jpg "style=" float: none; "title=" 5.png "alt=" Wkiol1yl05mc4rykaaqa4hq32b0344.jpg "/>
Association templates:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/74/AD/wKiom1Yl03Czef7MAAJ_YcbRB6I709.jpg "style=" float: none; "title=" 6.png "alt=" Wkiom1yl03czef7maaj_ycbrb6i709.jpg "/>
Figure out:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/74/A9/wKioL1Yl05mgK5VMAASFpIrSdmo016.jpg "style=" float: none; "title=" 7.png "alt=" Wkiol1yl05mgk5vmaasfpirsdmo016.jpg "/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/74/AD/wKiom1Yl03HCSvI7AAUVWKLJzCA920.jpg "style=" float: none; "title=" 8.png "alt=" Wkiom1yl03hcsvi7aauvwkljzca920.jpg "/>
This article is from the "Rookie Growth Road" blog, please be sure to keep this source http://francis905.blog.51cto.com/3048056/1704502
Zabbix using JMX to monitor Tomcat