zabbix代理尝试与服务器通话

时间:2017-04-12 12:41:31

标签: linux zabbix

我想创建一个zabbix代理和一个zabbix代理,并设置代理通过代理说话。我为此创建了docker容器(zabbix-proxy和zabbix-agent)。

proxy.conf:

Server=192.10.30.58  # address of server
ServerPort=10051
Hostname=DFS

agent.conf:

Server=ZabbixProxy  # the zabbix-proxy container name
ListenPort=10050
Hostname=Agent

我也在zabbix中创建了:

名为DFS的代理。

名为DFS和192.10.30.3:10051

的主机

名为Agent的主机和192.18.0.4:10050(代理运行的内部IP)

我可以看到来自Monitoring->的数据。代理和代理的最新数据。

所以,它有用。

但是,在我的日志中,我可以看到它给了我的代理:

INFO success: zabbix-agentd entered RUNNIG state, process has stayed up for > than 1 seconds (startsecs)


failed to accept an incoming connection: connection from "192.10.30.58" rejected, allowed hosts: "ZabbixProxy"

(192.10.30.3:10051是代理的外部IP)

似乎代理也尝试与服务器对话,但我不知道为什么。

如果在agent.conf而不是ZabbixProxy(zabbix代理容器的名称)我把代理192.10.30.3的地址,那么我仍然有相同的错误,我也无法获得最新数据代理商。

我使用ServerActive=ZabbixProxyServerActive=192.10.30.3:10051,我收到了:

...
INFO spawned: 'zabbix-agentd' with pid 51
2017-04-12 16:37:55,916 INFO exited: zabbix-agentd (exit status 1; not expected)
2017-04-12 16:37:57,928 INFO spawned: 'zabbix-agentd' with pid 52
2017-04-12 16:37:57,988 INFO exited: zabbix-agentd (exit status 1; not expected)
2017-04-12 16:38:01,001 INFO spawned: 'zabbix-agentd' with pid 53
2017-04-12 16:38:01,061 INFO exited: zabbix-agentd (exit status 1; not expected)
2017-04-12 16:38:02,063 INFO gave up: zabbix-agentd entered FATAL state, too many start retries too quickly

当然现在代理根本不起作用。

1 个答案:

答案 0 :(得分:0)

参数Server用于被动项 - 与代理的传入连接。代理根据参数ServerActive连接到服务器(或代理),这在您的情况下似乎配置错​​误。