2021-11-14 15:52:46 +08:00

43 lines
994 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: "Zabbix 笔记"
date: 2019-10-30T11:45:29+08:00
lastmod: 2019-10-30T11:45:29+08:00
tags: ["zabbix", "tomcat"]
categories: ["zabbix"]
---
## 通过 JavaGateway 监控 tomcat
- 编译 zabbix serverconfigure 增加 --enable-java
- 修改 zabbix_server.conf 文件,配置 JavaGateway 参数
```
JavaGateway=127.0.0.1
JavaGatewayPort=10052
StartJavaPollers=5
```
- 配置 tomcat catalina 启动参数
```bash
export CATALINA_OPTS="
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.port=10053
-Djava.rmi.server.hostname={tomcat_server_ip}
"
```
- 重启 tomcat
- 启动 JavaGateway
```bash
# 进入 zabbix_server 安装目录,执行
./sbin/zabbix_java/startup.sh
```
- 重启 zabbix-server
```
# 进入 zabbix_server 安装目录,执行
./sbin/zabbix_server
```