** 今天在玩zabbix监控的时候,在被监控端装好agent后,添加主机时界面上提示报错 Zabbix agent on jiabao is unreachable for 5 minutes 查看日志却发现

[root@localhost tmp]# tail -f zabbix_server.log 
 26115:20190307:235549.064 cannot send list of active checks to "192.168.1.150": host [localhost] not found
 26120:20190307:235715.010 executing housekeeper
 26120:20190307:235715.015 housekeeper [deleted 0 hist/trends, 0 items, 0 events, 0 problems, 0 sessions, 0 alarms, 0 audit items in 0.003076 sec, idle for 1 hour(s)]
 26115:20190307:235749.195 cannot send list of active checks to "192.168.1.150": host [localhost] not found
 26115:20190307:235949.324 cannot send list of active checks to "192.168.1.150": host [localhost] not found
 26115:20190308:000149.455 cannot send list of active checks to "192.168.1.150": host [localhost] not found
 26115:20190308:000349.587 cannot send list of active checks to "192.168.1.150": host [localhost] not found
 26115:20190308:000549.719 cannot send list of active checks to "192.168.1.150": host [localhost] not found
 26115:20190308:000749.846 cannot send list of active checks to "192.168.1.150": host [localhost] not found
 26115:20190308:000941.617 cannot send list of active checks to "192.168.1.150": host [localhost] not found
 26117:20190308:001141.741 cannot send list of active checks to "192.168.1.150": host [localhost] not found
 26117:20190308:001341.873 cannot send list of active checks to "192.168.1.150": host [localhost] not found
 26117:20190308:001542.001 cannot send list of active checks to "192.168.1.150": host [localhost] not found
于是我就查看agent端的配置文件发现hostname字段

和 web界面上 不一致,因此出现了主机名识别不了导致无法连接,必须保证二者必须一致才可以 更改之后查看server端的日志 成功**