[root@localhost zabbix]# zabbix_get -s 100.0.0.4 -k 'web_state'
zabbix_get [3806]: Check access restrictions in Zabbix agent configuration
解决方法:
zabbix agent端配置允许连接的server ip,也就是zabbix server的ip
[root@nginx zabbix]# vim /etc/zabbix/zabbix_agentd.conf
Server=100.0.0.18
# 重启zabbix-agent
systemctl restart zabbix-agent
验证:
[root@localhost zabbix]# zabbix_get -s 100.0.0.4 -k 'web_state'
6