zabbix监控Tomcat

编辑tomcat启动配置文件,开启监控

vi /opt/tomcat7/bin/catalina.sh 

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

yum安装zabbix 

yum install  zabbix-server zabbix-agent httpd -y
编辑配置文件 
/etc/httpd/conf.d/zabbix.conf, uncomment and set the right timezone for you.
php_value date.timezone ASia/Shanghai
systemctl restart zabbix-server zabbix-agent httpd
systemctl enable zabbix-server zabbix-agent httpd

http://192.168.1.106/zabbix/setup.php
Admin zabbix

Zabbix 的JMX监控架构
zaibbix Server-->Java gateway-->Tomcay(JMX counter)

yum安装zabbix-java-gateway

[root@node2 zabbix]# ps -ef|grep zabbix_java_gateway
zabbix     9851      1  0 08:21 ?        00:00:29 java -server -Dlogback.configurationFile=/etc/zabbix/zabbix_java_gateway_logback.xml -classpath lib:lib/android-json-4.3_r3.1.jar:lib/logback-classic-0.9.27.jar:lib/logback-core-0.9.27.jar:lib/slf4j-api-1.6.1.jar:bin/zabbix-java-gateway-4.2.6.jar -Dzabbix.pidFile=/var/run/zabbix/zabbix_java.pid -Dzabbix.startPollers=5 -Dsun.rmi.transport.tcp.responseTimeout=3000 com.zabbix.gateway.JavaGateway
root      12826   8401  0 10:57 pts/0    00:00:00 grep --color=auto zabbix_java_gateway
[root@node2 zabbix]# netstat -lntp|grep 10052
tcp6       0      0 :::10052                :::*                    LISTEN      9851/java           
[root@node2 zabbix]# 

配置重启zabbix-java-gateway

[root@node2 zabbix]# vi /etc/zabbix/zabbix_java_gateway.conf 
START_POLLERS=5

配置重启zabbix-server
[root@node2 zabbix]# vi /etc/zabbix/zabbix_server.conf  
JavaGateway=127.0.0.1 
JavaGatewayPort=10052
 StartJavaPollers=3
systemctl restart zabbix-java-gateway.service
systemctl enable zabbix-java-gateway.service
systemctl restart zabbix-server zabbix-agent httpd

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值