1.背景:web
server端:spa
172.16.59.197 ,172.16.59.98日誌
agent 端:orm
hostname:dba-test-hzj02 server
IP:172.16.59.98it
2.方式:table
配置多個server,serveractiveform
3.實例class
# more /usr/local/zabbix/etc/zabbix_agentd.conftest
Hostname=dba-test-hzj02 #agent端主機名
Server=172.16.59.197 #容許172.16.59.197來抓取數據
Server=172.16.59.98 #容許172.16.59.98來抓取數據
ServerActive=172.16.59.197 #將監控數據發送到172.16.59.197
ServerActive=172.16.59.98 #將監控數據發送到172.16.59.98
ListenPort=10050
BufferSize=1024
StartAgents=10
DebugLevel=2
PidFile=/home/logs/zabbix/zabbix_agentd.pid
LogFile=/home/logs/zabbix/zabbix_agentd.log
LogFileSize=10
EnableRemoteCommands=1
UnsafeUserParameters=1
Include=/home/logs/zabbix/zabbix_command.conf
Timeout=30
4.問題
配置多個server端時,發現後增的server端不能從agent端抓取到數據,可是數據能夠從agent端主動傳輸到zabbix_server端,檢查server端日誌,發現報錯以下:
9438:20171012:182812.895 cannot send list of active checks to "172.16.59.98": host [dba-test-hzj02] not found
緣由是:
1.後增的server端web頁面上關於agent端的配置 Host name 與agent端中配置文件中的hostname不一致,改爲一致 dba-test-hzj02
2.IP address要配成agent端的IP地址,不要用127.0.0.1或localhost代替,改爲172.16.59.98