ZABBIX之TOMCAT监控
Posted Tank
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ZABBIX之TOMCAT监控相关的知识,希望对你有一定的参考价值。
一,server端:
1,jdk
2, 备份zabbix_server.conf
./configure --prefix=/usr/local/zabbix --enable-server --enable-proxy --enable-agent --with-mysql --with-net-snmp --with-libcurl --enable-java
make ;make install
cp
3,
vim /usr/local/zabbix/sbin/zabbix_java/settings.sh
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
JavaGateway=127.0.0.1
JavaGatewayPort=10052
StartJavaPollers=5
/usr/local/zabbix/sbin/zabbix_server
/usr/local/zabbix/sbin/zabbix_java/startup.sh
ss -tunlp | grep 10052
hostname -i #解析IP,返回本机IP
二,tomcat端
wget http://archive.apache.org/dist/tomcat/tomcat-7/v7.0.8/bin/extras/catalina-jmx-remote.jar -P /usr/local/tomcat/lib/
vim /usr/local/tomcat/xx.lppz.com/tomcat.sh
export CATALINA_OPTS="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=127.0.0.1 -Dcom.sun.management.jmxremote.port=5500"
重启tomcat
重启zabbix
本机 和服务器
java -jar cmdline-jmxclient-0.10.3.jar - 192.168.32.119:5500 java.lang:type=Memory NonHeapMemoryUsage
java -jar cmdline-jmxclient-0.10.3.jar - localhost:5500 java.lang:type=Memory NonHeapMemoryUsage
java -jar cmdline-jmxclient-0.10.3.jar - 192.168.19.22:5500 java.lang:type=Memory NonHeapMemoryUsage
以上是关于ZABBIX之TOMCAT监控的主要内容,如果未能解决你的问题,请参考以下文章