[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