zabbix怎么监控tomcat
发布网友
发布时间:2024-09-29 02:59
我来回答
共1个回答
热心网友
时间:2024-10-27 15:40
zabbix 监控tomcat
server端
rpm -ivh jdk-8u20-linux-x64.rpm
vi /etc/profile
JAVA_HOME=/usr/java/jdk1.8.0_20
PATH=$PATH:$JAVA_HOME
CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export JAVA_HOME
export PATH
export CLASSPATH
source /etc/profile
java -version
cd /root/zabbix-2.0.6
./configure --enable-java -prefix=/usr/local/zabbix/zabbix_java
make&&make install
vi /usr/local/zabbix/zabbix_java/sbin/zabbix_java/settings.sh
LISTEN_IP="0.0.0.0"
LISTEN_PORT=10052
START_POLLERS=5
vi /usr/local/zabbix/etc/zabbix_server.conf
JavaGateway=127.0.0.1
JavaGatewayPort=10052
StartJavaPollers=5
启动zabbix_java
cd /usr/local/zabbix/zabbix_java/sbin/zabbix_java
./startup.sh
tomcat 服务器端
cd /usr/apache-tomcat-7.0.53/bin
修改tomcat catalina.sh
添加如下内容:
CATALINA_OPTS="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.port=123 -Dcom.sun.management.jmxremote.ssh=false -Djava.rmi.server.hostname=192.168.18.19" -----备注(192.168.18.19是客户端ip地址)
修改tomcat服务器的hostname
192.168.18.19 localhost.localdomain localhost
重启tomcat
pkill java
cd /usr/apache-tomcat-7.0.53/bin
./startup.sh
在zabbix服务器端用工具测试
下载cmdline-jmxclient-0.10.3.jar工具
java -jar cmdline-jmxclient-0.10.3.jar - 192.168.18.19:123
在服务器端进行测试
java -jar cmdline-jmxclient-0.10.3.jar - 192.168.18.19:123 java.lang:type=Memory NonHeapMemoryUsage
热心网友
时间:2024-10-27 15:40
zabbix 监控tomcat
server端
rpm -ivh jdk-8u20-linux-x64.rpm
vi /etc/profile
JAVA_HOME=/usr/java/jdk1.8.0_20
PATH=$PATH:$JAVA_HOME
CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export JAVA_HOME
export PATH
export CLASSPATH
source /etc/profile
java -version
cd /root/zabbix-2.0.6
./configure --enable-java -prefix=/usr/local/zabbix/zabbix_java
make&&make install
vi /usr/local/zabbix/zabbix_java/sbin/zabbix_java/settings.sh
LISTEN_IP="0.0.0.0"
LISTEN_PORT=10052
START_POLLERS=5
vi /usr/local/zabbix/etc/zabbix_server.conf
JavaGateway=127.0.0.1
JavaGatewayPort=10052
StartJavaPollers=5
启动zabbix_java
cd /usr/local/zabbix/zabbix_java/sbin/zabbix_java
./startup.sh
tomcat 服务器端
cd /usr/apache-tomcat-7.0.53/bin
修改tomcat catalina.sh
添加如下内容:
CATALINA_OPTS="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.port=123 -Dcom.sun.management.jmxremote.ssh=false -Djava.rmi.server.hostname=192.168.18.19" -----备注(192.168.18.19是客户端ip地址)
修改tomcat服务器的hostname
192.168.18.19 localhost.localdomain localhost
重启tomcat
pkill java
cd /usr/apache-tomcat-7.0.53/bin
./startup.sh
在zabbix服务器端用工具测试
下载cmdline-jmxclient-0.10.3.jar工具
java -jar cmdline-jmxclient-0.10.3.jar - 192.168.18.19:123
在服务器端进行测试
java -jar cmdline-jmxclient-0.10.3.jar - 192.168.18.19:123 java.lang:type=Memory NonHeapMemoryUsage