一 自动发现
1. 创建自动发现规则
2. 创建发现动作
3. 在private repository上配置agent
[root@dnfrepo ~]# vim /etc/zabbix/zabbix_agentd.conf
117 Server=127.0.0.1,192.168.88.5
182 Hostname=web2
[root@dnfrepo ~]# systemctl enable zabbix-agent.service --now
二 主动监控
- 默认zabbix使用的是被动监控,主被动监控都是针对被监控主机而言的。
- 被动监控:Server向Agent发起请求,索取监控数据。此种模式常用
- 主动监控:Agent向Server发起连接,向Server汇报
1. 修改配置文件,只使用主动监控
[root@dnfrepo ~]# vim /etc/zabbix/zabbix_agentd.conf
117 # Server=127.0.0.1,192.168.88.5
142 StartAgents=0
171 ServerActive=192.168.88.5
242 RefreshActiveChecks=120
# 重启服务
[root@dnfrepo ~]# systemctl restart zabbix-agent.service
[root@dnfrepo ~]# ss -tlnp | grep :10050 # 端口号消失
2. 创建用于主动监控的主机
三 拓扑图
1. 创建拓扑图,反映拓扑结构
-
添加元素:
- 地图元素:可以是一个装饰图形,也可以对应具体的设备
- 形状:长方形、圆形
- 链接:连线,多个设备之间才能使用链接
2. 完善拓扑图
- 添加链接:按住ctrl键,点选两台设备,点链接边上的添加