步骤 4 – 启用/启动 Zabbix 代理

[jack@onitroad ~]# Systemctl enable zabbix-agent
[jack@onitroad ~]# Systemctl start zabbix-agent

环境:

  • 主机名 = webserver02.onitroad.com
  • IP 地址 = 192.168.1.72
  • 操作系统 = CentOS 7/RHEL 7

步骤 6 – 在 Zabbix 前端配置主机

要在 Zabbix 前端添加远程主机服务器,请执行以下步骤:

  • 1 转到:配置 -> 主机

  • 2 点击右侧的创建主机

  • 3 填写远程主机服务器的以下参数
    输入主机名:远程系统的主机名
    可见名称:zabbix中显示的名称
    组:为主机选择所需的组
    代理接口:我们主机的IP

  • 4 转到模板选项卡并为主机选择所需的模板

  • 5 点击添加

如何在 CentOS 7/RHEL 7 上安装 Zabbix Agent

在 CentOS/RHEL 7 上安装 zabbix 服务器后。

本文将演示如何在 CentOS/RHEL 7 系统上安装 zabbix agent。

步骤 1 – 添加所需的存储库

在首先安装 Zabbix Agent 之前,我们应该导入 RPM GPG Key 并添加 Zabbix yum 存储库:

[jack@onitroad ~]# rpm --import http://repo.zabbix.com/RPM-GPG-KEY-ZABBIX
[jack@onitroad ~]# rpm -ivh http://repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/zabbix-release-3.2-1.el7.noarch.rpm

步骤 2 – 安装 Zabbix 代理

[jack@onitroad ~]# yum install zabbix-agent -y

步骤 3 – 编辑 Zabbix 代理配置

Zabbix Agent安装成功后,我们需要在Zabbix Agent配置文件/etc/zabbix/zabbix_agentd.conf中添加Zabbix监控服务器的IP

[jack@onitroad ~]# 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

步骤 5 – 调整防火墙配置

[jack@onitroad ~]# firewall-cmd - -permanent - -add-port=10050/tcp
[jack@onitroad ~]# firewall-cmd - -reload
日期:2020-06-02 22:19:00 来源:oir作者:oir