tomcat 监控
- java-gateway下载地址:https://repo.zabbix.com/zabbix/4.0/rhel/7/x86_64/zabbix-java-gateway-4.0.19-1.el7.x86_64.rpm
环境
-
jdk1.8 tomcat 8.5
-
搭建tomcat服务部分略过
-
单独访问
-
安装(默认会下载1.8 的openjdk)
-
yum install zabbix-java-gateway-4.0.9-3.el7.x86_64.rpm
启动服务
- systemctl start zabbix-java-gateway.service
- server 中添加对gateway的监听
- vim /apps/zabbix_server/etc/zabbix_server.conf
- 重新启动服务
tomcat 开启jvm监控接口
- 停服务:/apps/tomcat/bin/catalina.sh stop
- 重新编辑这个脚本, 在里面插入一个变量,最后填上本机ip
CATALINA_OPTS="$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.47.164"
- [![](https://www.xiehegang.online/wp-content/uploads/2020/04/174cbfab884bb8f1d25c97b10adc5fd3.png)](https://www.xiehegang.online/wp-content/uploads/2020/04/174cbfab884bb8f1d25c97b10adc5fd3.png)
- 开启服务: /apps/tomcat/bin/catalina.sh start
- [![](https://www.xiehegang.online/wp-content/uploads/2020/04/4f8303d54ff296f54e43d79c49f4aacf.png)](https://www.xiehegang.online/wp-content/uploads/2020/04/4f8303d54ff296f54e43d79c49f4aacf.png)
### zabibix 添加监控
- 创建主机
- [![](https://www.xiehegang.online/wp-content/uploads/2020/04/2878ab278d230e16dc22a7741f57b086.png)](https://www.xiehegang.online/wp-content/uploads/2020/04/2878ab278d230e16dc22a7741f57b086.png)
- 添加主机信息
- [![](https://www.xiehegang.online/wp-content/uploads/2020/04/d6a9019206742c816fce75583591239e.png)](https://www.xiehegang.online/wp-content/uploads/2020/04/d6a9019206742c816fce75583591239e.png)
- 添加模板
- [![](https://www.xiehegang.online/wp-content/uploads/2020/04/5a1c2facf172e4e0ff90dc1bf3833cde.png)](https://www.xiehegang.online/wp-content/uploads/2020/04/5a1c2facf172e4e0ff90dc1bf3833cde.png)
### 查看检测情况
- [![](https://www.xiehegang.online/wp-content/uploads/2020/04/03a8d109ba56ad029047f62535b5f755.png)](https://www.xiehegang.online/wp-content/uploads/2020/04/03a8d109ba56ad029047f62535b5f755.png)
- 点击主机 - 图形 - 线程监控项 - 预览
- [![](https://www.xiehegang.online/wp-content/uploads/2020/04/8f72b6c0369d195291015f1111c2b96a.png)](https://www.xiehegang.online/wp-content/uploads/2020/04/8f72b6c0369d195291015f1111c2b96a.png)