Zabbix学习笔记(二)添加agent主机

一、安装环境

阿里云 ECS 服务器:安全组开通 80、1000~65535 端口(学习使用)

角色 系统 IP 配置
Server CentOS 7.8 64位 8.130.24.61 2 核 1 GiB
MySQL CentOS 7.8 64位 8.130.27.107 2 核 1 GiB

二、下载RPM包

下载地址:https://repo.zabbix.com/zabbix/4.2/rhel/7/x86_64/
下载 zabbix-agent-4.2.8-1.el7.x86_64.rpm

三、Server端安装agent

没有环境请参考上篇文章Zabbix学习笔记(一)CentOS 7.8安装zabbix-server-4.2

Zabbix-Server 端安装的 zabbix-agent 不用修改配置,默认就能用

yum install -y zabbix-agent-4.2.8-1.el7.x86_64.rpm
systemctl start zabbix-agent.service && systemctl enable zabbix-agent.service

Web 端已经默认添加了 Zabbix-Server 端的主机,在 配置主机 里面查看

在这里插入图片描述

四、其他主机安装agent

我们监控 MySQL 这台主机

yum install -y zabbix-agent-4.2.8-1.el7.x86_64.rpm

修改 agent 的配置文件/etc/zabbix/zabbix_agentd.conf

Server=8.130.24.61
StartAgents=0
ServerActive=8.130.24.61
Hostname=mysql.server

启动 agent

systemctl start zabbix-agent.service && systemctl enable zabbix-agent.service

Web 端添加该主机

在这里插入图片描述
添加模版

在这里插入图片描述

再次查看主机列表,已经添加成功
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/qq_39680564/article/details/109743137