1. 安装linux端的agent

[root@jymlinux ~]# yum install zabbix zabbix-agent zabbix-sender


2.配置zabbix-agent的配置文件

[root@jymlinux ~]# vim /etc/zabbix/zabbix_agentd.conf

Server=127.0.0.1,192.168.3.9                    #允许server基于IP获取,可配置多个server
ServerActive=127.0.0.1,192.168.3.9              #向server回传数据,可配置多个
Hostname=jymlinux                               #向server回传,全局唯一,最好是域名解析地址,此处是我的主机名称
其他配置默认配置就好


3.启动zabbix-agent服务

[root@jymlinux ~]# service zabbix-agent start
Starting Zabbix agent:                                     [确定]
[root@jymlinux ~]# ss -tanlp | grep 10050
LISTEN     0      128                      :::10050                   :::*      users:(("zabbix_agentd",6133,5),("zabbix_agentd",6134,5),("zabbix_agentd",6135,5),("zabbix_agentd",6136,5),("zabbix_agentd",6137,5),("zabbix_agentd",6138,5),("zabbix_agentd",6139,5))
LISTEN     0      128                       *:10050                    *:*      users:(("zabbix_agentd",6133,4),("zabbix_agentd",6134,4),("zabbix_agentd",6135,4),("zabbix_agentd",6136,4),("zabbix_agentd",6137,4),("zabbix_agentd",6138,4),("zabbix_agentd",6139,4))


4.在zabbix-server启用监控本机

zabbix-agent_zabbix

此时zabbix开始监控zabbix-server本机了


5.zabbix监控agent端配置如上1到3,在Hosts中点create host,出现如下界面,填入agent端的相关信息

zabbix-agent_web_02

6.可以选择模板直接配置agent端,点击Selsct

zabbix-agent_agent_03



7.将主机加入资产清单

zabbix-agent_web_04

8.主机添加完毕,之后添加各监控项