Zabbix实战之客户端自动发现

一、客户端状态检查

1.检查客户端的zabbix-agent2是否正常

[root@node1 ~]# systemctl is-active zabbix-agent2.service 
active

2.从服务端检查是否可以获得客户端信息

[root@IT-01 ~]# zabbix_get -s '192.168.200.135' -p 10050 -k 'agent.ping'
1

二、配置hosts解析

服务端

[root@IT-01 ~]# vim /etc/hosts
[root@IT-01 ~]# cat /etc/hosts 
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6



192.169.200.129 IT-01
192.168.200.135 node1

客户端

[root@node1 ~]# cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

192.169.200.129 IT-01
192.168.200.135 node1

三、自动发现配置

1.查看自动发现当前规则

在这里插入图片描述

2.创建新规则

在这里插入图片描述

3.查看设置好的规则

在这里插入图片描述

4.启用动作及触发器

在这里插入图片描述

四、检查是否自动发现了客户端

在这里插入图片描述

[root@IT-01 ~]# tail /var/log/zabbix/zabbix_server.log
  1839:20210602:024139.067 cannot send list of active checks to "192.168.200.150": host [192.168.200.129] not found
  1839:20210602:024319.135 cannot send list of active checks to "192.168.200.135": host [192.168.200.129] not found
  1839:20210602:024340.066 cannot send list of active checks to "192.168.200.150": host [192.168.200.129] not found
  1839:20210602:024520.121 cannot send list of active checks to "192.168.200.135": host [192.168.200.129] not found
  1839:20210602:024541.066 cannot send list of active checks to "192.168.200.150": host [192.168.200.129] not found
  1839:20210602:024721.121 cannot send list of active checks to "192.168.200.135": host [192.168.200.129] not found
  1839:20210602:024742.071 cannot send list of active checks to "192.168.200.150": host [192.168.200.129] not found
  1839:20210602:024922.126 cannot send list of active checks to "192.168.200.135": host [192.168.200.129] not found
  1839:20210602:024943.062 cannot send list of active checks to "192.168.200.150": host [192.168.200.129] not found
  1829:20210602:175015.926 enabling Zabbix agent checks on host "node1": host became available

  • 2
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

江湖有缘

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值