前提
(1) /etc/hosts 文件如下
[root@testdb ~]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.56.56 testdb
(2)zabbix 已經添加了一個主機名字叫做 “
testdb ”
結論:
1. 如果 /etc/zabbix/zabbix_agentd.conf 文件的 Hostname=192.168.56.56 ,則zabbix會自動添加一個叫 “192.168.56.56” 的主機名。
2. 如果 /etc/zabbix/zabbix_agentd.conf 文件的 Hostname=testdb ,則zabbix不會自動添加一個叫 “
192.168.56.56” 的主機名。