zabbix-server页面中定义zabbix自动注册动作action
1.Configuration-->Actions-->Event source:Auto registration-->Create action

①Action:这项内容是定义发送邮件/消息的内容
name - 腾讯云主机自动注册
Default subject - Auto registration: {HOST.HOST}
Default message - Host name: {HOST.HOST}
                  Host IP: {HOST.IP}
                  Agent port: {HOST.PORT}
[说明:Default message的内容可以自行添加补充]

②Conditions
Host metadata like baimi
[说明:建议添加一个自动注册的标示,更安全,也可以把以前添加过监控的服务器区分开,避免重复添加监控]
Proxy = 10.104.104.104

[说明:此处使用zabbix-proxy]

③Options
Send message to users
Add host
Add to host groups:
Link to templates:


zabbix-agent端配置
1. 必须制定zabbix官方的yum源来安装
rpm -ivh http://repo.zabbix.com/zabbix/3.2/rhel/6/x86_64/zabbix-release-3.2-1.el6.noarch.rpm
yum repolist
yum -y install zabbix-agent --enablerepo=zabbix
=>看一下zabbix-agent版本再安装
zabbix_agentd -V
=>zabbix_agentd (daemon) (Zabbix) 3.2.5
此处安装较新版本3.2.5


2. 修改zabbix_agentd的配置
egrep -v --color=auto  "^;|^\s*$|^\s*#" /etc/zabbix/zabbix_agentd.conf
PidFile=/var/run/zabbix/zabbix_agentd.pid
LogFile=/var/log/zabbix/zabbix_agentd.log
LogFileSize=0
EnableRemoteCommands=1
Server=10.104.104.104
ServerActive=10.104.104.104

Hostname=142.125.65.45-TX
HostMetadata=baimi
Include=/etc/zabbix/zabbix_agentd.d/*.conf
UnsafeUserParameters=1


tailf /var/log/zabbix/zabbix_agentd.log
14643:20170502:094616.432 no active checks on server [10.104.104.104:10051]: host [142.125.65.45-TX] not found
是因为Default subject - Auto registration: {HOST.HOST}
不是这个原因
这条日志的原因是, 被控端还没有在server端完成注册而生成的日志. 完成注册后, 就不会再提示这条日志了.