码迷,mamicode.com
首页 > 其他好文 > 详细

Zabbix监控tomcat

时间:2017-08-19 12:46:39      阅读:211      评论:0      收藏:0      [点我收藏+]

标签:root   end   ima   $path   tcp   roo   sbin   size   make   

Zabbix监控tomcat

1.1 服务端配置

tar zxf jdk-8u66-linux-x64.tar.gz 
mv /home/shangbang/tools/jdk1.8.0_66 /application/java/
vim /etc/profile
export JAVA_HOME=/application/java/
export CLASSPATH=$CLASSPATH:$JAVA_HOME/lib:$JAVA_HOME/jre/lib
export PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH:$HOMR/bin
java -version

tar xf zabbix-3.0.3.tar.gz
cd zabbix-3.0.3
./configure --enable-java --prefix=/application/zabbix_java
make && make install

vim /application/zabbix/etc/zabbix_server.conf
JavaGateway=127.0.0.1
JavaGatewayPort=10052
StartJavaPollers=5

vim /application/zabbix_java/sbin/zabbix_java/settings.sh 
LISTEN_IP="0.0.0.0"
LISTEN_PORT=10052
START_POLLERS=5

cd /application/zabbix_java/sbin/zabbix_java
./startup.sh


[root@kvm2 tools]# netstat  -lntup
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address               Foreign Address             State       PID/Program name   
tcp        0      0 0.0.0.0:10050               0.0.0.0:*                   LISTEN      14611/zabbix_agentd 
tcp        0      0 127.0.0.1:10051             0.0.0.0:*                   LISTEN      30416/zabbix_server 
tcp        0      0 127.0.0.1:9000              0.0.0.0:*                   LISTEN      6040/php-fpm        
tcp        0      0 0.0.0.0:80                  0.0.0.0:*                   LISTEN      4417/nginx          
tcp        0      0 0.0.0.0:22                  0.0.0.0:*                   LISTEN      1998/sshd           
tcp        0      0 127.0.0.1:25                0.0.0.0:*                   LISTEN      1786/master         
tcp        0      0 :::10050                    :::*                        LISTEN      14611/zabbix_agentd 
tcp        0      0 :::10052                    :::*                        LISTEN      30674/java          
tcp        0      0 :::3306                     :::*                        LISTEN      1730/mysqld         
tcp        0      0 :::22                       :::*                        LISTEN      1998/sshd           
tcp        0      0 ::1:25                      :::*                        LISTEN      1786/master         
[root@kvm2 tools]# 

 

1.2 客户端配置

vim /application/tomcat/bin/catalina.sh 

CATALINA_OPTS="-Dcom.sun.management.jmxremote 
-Dcom.sun.management.jmxremote.port=12345
-Dcom.sun.management.jmxremote.authenticate=false 
-Dcom.sun.management.jmxremote.ssl=false 
-Djava.rmi.server.hostname=192.168.1.73"


cd /application/tomcat/bin
./startup.sh


[root@kvm3 bin]# netstat -lntup
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address               Foreign Address             State       PID/Program name   
tcp        0      0 0.0.0.0:10050               0.0.0.0:*                   LISTEN      8487/zabbix_agentd  
tcp        0      0 0.0.0.0:22                  0.0.0.0:*                   LISTEN      1568/sshd           
tcp        0      0 127.0.0.1:25                0.0.0.0:*                   LISTEN      1799/master         
tcp        0      0 :::10050                    :::*                        LISTEN      8487/zabbix_agentd  
tcp        0      0 ::ffff:127.0.0.1:8005       :::*                        LISTEN      9197/java           
tcp        0      0 :::52711                    :::*                        LISTEN      9197/java           
tcp        0      0 :::8009                     :::*                        LISTEN      9197/java           
tcp        0      0 :::8080                     :::*                        LISTEN      9197/java           
tcp        0      0 :::42258                    :::*                        LISTEN      9197/java           
tcp        0      0 :::22                       :::*                        LISTEN      1568/sshd           
tcp        0      0 :::12345                    :::*                        LISTEN      9197/java           
tcp        0      0 ::1:25                      :::*                        LISTEN      1799/master         
[root@kvm3 bin]# 

1.3 Web操作

技术分享

 

技术分享

 

Zabbix监控tomcat

标签:root   end   ima   $path   tcp   roo   sbin   size   make   

原文地址:http://www.cnblogs.com/Carr/p/7395690.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!