Zabbix实战之客户端自动发现
Posted jks212454
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Zabbix实战之客户端自动发现相关的知识,希望对你有一定的参考价值。
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
以上是关于Zabbix实战之客户端自动发现的主要内容,如果未能解决你的问题,请参考以下文章
Zabbix:项目实战之--自动发现nginx调度器及后端web服务集群自定义参数监控
青蛙学Linux—Zabbix Web使用之Zabbix发现功能①自动网络发现
青蛙学Linux—Zabbix Web使用之Zabbix发现功能②主动客户端自动注册