我正在尝试安装zabbix代理。我的网络如下所示
Zabbix服务器IP: 192.168.101.11 (内部网络) Zabbix代理服务器: 192.168.102.109 (内部网络)
我可以从我的代理机器上打开zabbix代理IP。
[root@102_109 ~]# ping 172.1.16.2
PING 172.1.16.2 (172.1.16.2) 56(84) bytes of data.
64 bytes from 172.1.16.2: icmp_seq=1 ttl=64 time=215 ms
64 bytes from 172.1.16.2: icmp_seq=2 ttl=64 time=214 ms
64 bytes from 172.1.16.2: icmp_seq=3 ttl=64 time=214 ms
64 bytes from 172.1.16.2: icmp_seq=4 ttl=64 time=214 ms
我可以从我的zabbix服务器连接到zabbix代理-
zabbix_get -k agent.ping -s 192.168.102.109
1
我的zabbix_proxy.conf文件( 102.109)如下所示
ProxyMode=0
Server=192.168.101.11
Hostname=CME_Proxy
LogFile=/tmp/zabbix_proxy.log
DBName=zabbix
DBUser=root
DBPassword=password
在zabbix代理机器(172.1.16.2)上,配置如下。
EnableRemoteCommands=1
LogFile=/tmp/zabbix_agentd.log
Server=192.168.101.11,192.168.102.109
ServerActive=192.168.101.11,192.168.102.109
Hostname=172.1.16.2
AllowRoot=1
在我的zabbix前端,我已经将主机配置为由代理(CME_Proxy)监视的主机,并且只有一个条目(agent.ping)。
我无法从zabbix特工那里得到任何数据。在我的代理机器上,当我运行以下命令时,它返回一个空白值。
zabbix_get -k agent.ping -s 172.1.16.2
<this is blank response>
因此,在主机配置中,zabbix显示了错误-
“在172.1.16.2处收到来自Zabbix代理的空响应。假设该代理由于访问权限而取消连接。”
如果我配置的方式是正确的,请有人指点我吗?如果不是,如何正确地做到这一点。如果您需要更多的数据,请告诉我。
谢谢
穆库尔
发布于 2015-06-24 06:49:01
弄明白了:
在代理配置文件中,以下参数
Server=192.168.101.11,192.168.102.109
ServerActive=192.168.101.11,192.168.102.109
应该是
Server=192.168.101.11,172.1.16.1
ServerActive=192.168.101.11,172.1.16.1
发布于 2017-02-02 15:59:24
> server 172.1.16.2,zabbix_agentd.conf中的一些更改
Server=192.168.102.109 # it will allow connections from proxy ip # ServerActive=192.168.102.109 # comment ServerActive if you won't use active checks
>检查沟通:就像你以前做的那样!
enter code here zabbix_get -k agent.ping -s 172.1.16.2 # It should return 1.
PS:检查zabbix_proxy.conf中的主机名,它应该是CME_Proxy,或者与您在web接口中定义的相同。
发布于 2020-08-31 10:05:45
# FOR step-by-step guide of running latest zabbix version 5.0 follow these links
# https://blog.zabbix.com/zabbix-docker-containers/7150/
# https://techexpert.tips/zabbix/monitoring-docker-using-zabbix/
#it's simple just add all zabbix server IPs in zabbix host agent conf #file like below
Server=192.168.101.11,172.1.16.1
ServerActive=192.168.101.11,172.1.16.1
if you ur using zabbix server-agent model using docker containers then while deploying containers specify zabbix server Host/Container IPs which wants to connect to zabbix agent container
Assuming if you wanna deploy zabbix server and agent in the same server running docker containers just run below docker deploy commands
#Zabbix Server Container
sudo docker run --name zabbix-appliance -p 8080:80 -p 10051:10051 -d -h zabbix-server zabbix/zabbix-appliance
#Zabbix Agent container
sudo docker run --name=dockbix-agent-xxl --privileged -v /:/rootfs -v /var/run:/var/run -p 10050:10050 -e "ZA_Server=192.168.0.3,172.17.0.1" -e "ZA_ServerActive=192.168.0.3,172.17.0.1" -d monitoringartist/dockbix-agent-xxl-limited:latest
#Default username and password of zabbix server
#username: Admin password: zabbix
# For monitoring docker containers resources import a template from this cloned repository https://github.com/monitoringartist/zabbix-docker-monitoring
https://stackoverflow.com/questions/31018492
复制相似问题