步骤 4 – 启用/启动 Zabbix 代理
# Systemctl enable zabbix-agent # Systemctl start zabbix-agent
步骤 1 – 添加所需的存储库
在首先安装 Zabbix Agent 之前,我们应该添加 Zabbix apt 存储库:
# wget http://repo.zabbix.com/zabbix/3.2/ubuntu/pool/main/z/zabbix-release/zabbix-release_3.2-1+xenial_all.deb # dpkg -i zabbix-release_3.2-1+xenial_all.deb
步骤 3 – 编辑 Zabbix 代理配置
Zabbix Agent安装成功后,我们需要在Zabbix Agent配置文件/etc/zabbix/zabbix_agentd.conf中添加Zabbix监控服务器的IP
# vi /etc/zabbix/zabbix_agentd.conf
### Option: Server # List of comma delimited IP addresses (or hostnames) of Zabbix servers. # Incoming connections will be accepted only from the hosts listed here. # If IPv6 support is enabled then '127.0.0.1', '::127.0.0.1', '::ffff:127.0.0.1' are treated equally. ## Mandatory: no # Default: # Server= Server=192.168.1.201 # Add here the IP of your Zabbix Server #### Option: ServerActive # ServerActive= #ServerActive=192.168.1.201 # Add here the IP of your Zabbix Server #Hostname=# web01.onitroad.com #Add here the Hostname of your server
步骤 5 – 在 Zabbix 前端配置主机
要在 Zabbix 前端添加远程主机服务器,请执行以下步骤:
1 转到:配置 -> 主机
2 点击右侧的创建主机
3 填写远程主机服务器的以下参数
输入主机名:远程系统的主机名
可见名称:zabbix中显示的名称
组:为主机选择所需的组
代理接口:我们主机的IP4 转到模板选项卡并为主机选择所需的模板
5 点击添加
步骤 2 – 安装 Zabbix 代理
# apt-get update # apt-get install zabbix-agent -y
环境:
- 主机名 = web01.onitroad.com
- IP 地址 = 192.168.1.50
- 操作系统 = Ubuntu 16.04 LTS
本文将演示如何在 Ubuntu 16.04 LTS 操作系统上安装 zabbix 代理。
日期:2020-06-02 22:19:01 来源:oir作者:oir
