新建一台虚拟机来做测试
系统:centos 7.6
主机名:za_test
ip:192.168.6.22
因为是测试环境,所以当前环境没有dns,需要用到主机名的地方就要写hosts表了,先将这台测试机写入到zabbix_server的hosts文件中:
192.168.6.22 za_test 1、配置agentd客户端
[root@za_test ~]# grep -v "#" /usr/local/etc/zabbix_agentd.conf | grep -v "^$"
LogFile=/tmp/zabbix_agentd.log
Server=192.168.6.10
ServerActive=192.168.6.10
HostnameItem=system.hostname
HostMetadataItem=system.uname
[root@za_test ~]#
配置完后启动agentd客户端
2、配置zabbix_server自动发现规则

点右上角的创建发现规则

然后点到左边的动作,再点右上角的创建动作


按照上面的填写,再点动作旁边的操作:


在自动发现这里就可以看到新发现的这台机器了。

在主机这里设置好的动作已经将它加入到主机组并关联了模板。