我一直在尝试设置 Zabbix 来监控 2 台不同的 Amazon EC2 机器上的 2 台 tomcat 服务器,但没有成功。
主机上的 Z 为绿色,但 JMX 为红色并出现这些错误
- ZBX_TCP_READ() 失败:[4] 系统调用中断
- 其他错误 [111] 连接被拒绝
以及许多这样的错误,一个接一个,从某种意义上说,我解决了一个错误,然后又出现了一个新的错误。
这些是一些假设
所有机器运行 Ubuntu 12.10 及更高版本
服务器的IP地址:66.55.12.120(运行 Zabbix 服务器 v2.2.4(修订版 46772)(2014 年 6 月 23 日))
代理IP地址:87.52.45.198(运行 Zabbix 代理 v2.2.2(修订版 42525)(2014 年 2 月 12 日))
我的本地机器的IP地址:76.89.54.111
这是我到目前为止所做的。
在服务器端:
1)使用安装的Zabbix_serversudo apt-get install zabbix-server-mysql.
2) GUI、mysql数据库均已安装并配置。
3) 以下是我在文件中所做的仅有的 3 处更改
/etc/zabbix/zabbix_server.conf
...
JavaGateway=localhost
JavaGatewayPort=10052
StartJavaPollers=5
...
4)使用Zabbix Java网关安装sudo apt-get install zabbix-java-gateway.
5) 以下是我在文件中所做的仅有的 3 处更改
/etc/zabbix/zabbix_java_gateway.conf
...
LISTEN_IP="127.0.0.1"
LISTEN_PORT=10052
START_POLLERS=5
...
在客户端:1)使用安装的Zabbix客户端sudo apt-get install zabbix-agent
2) 以下是我在文件中所做的仅有的 3 处更改
/etc/zabbix/zabbix_agentd.conf
...
Server=66.55.12.120
StartAgents=5
ServerActive=66.55.12.120:10051
Hostname=Security-test-JMX-EC2
... <br />
3) 主机名与在 GUI 上创建主机时提到的主机名相同。
我认为IP和端口存在一些问题。因此,以下是从机器的 Amazon EC2 安全组获取的两台机器的出站规则
OUTBOUND RULES for SERVER SECURITY GROUP:
Type Protocol Port Source Reasoning
Custom- TCP 8080 0.0.0.0/0
TCP Rule
All ICMP All N/A 0.0.0.0/0
Custom- TCP 10052 27.52.52.128/32 For access from Agent
TCP Rule
Custom- TCP 8081 76.84.120.130/32 To access Zabbix GUI from-
TCP Rule -my local machine's web browser
Custom- TCP 10051 27.52.52.128/32 As the agent responds to-
TCP Rule -the server on Port 10051TCP Rule-
-Must allow inbound communications-
- from the agent.
Custom- TCP 11000 27.52.52.128/32 The agent's JMX reporting-
TCP Rule -happens on port 11000(not on 12345).
OUTBOUND RULES for CLIENT SECURITY GROUP:
Type Protocol Port Source
HTTPS TCP 443 0.0.0.0/0
Custom- TCP 10050 66.55.12.120/32
TCP Rule
Custom- TCP 10052 66.55.12.120/32
TCP Rule
Custom- TCP 11000 66.55.12.120/32
TCP Rule
HTTP TCP 80 76.89.54.111/32
Custom- TCP 8080 76.89.54.111/32
TCP Rule
Custom- TCP 8443 76.89.54.111/32
TCP Rule
我缺少什么?请指导我。
任何帮助表示赞赏。
Thanks
Goutham