Docker搭建zabbix

搭建zabbix

拉取镜像并运行容器,根据拉取的容器名字不同,监控版本不同

docker run -d --name zabbix -p 8090:80 -p 10051:10051 --restart unless-stopped zabbix/zabbix-appliance:latest

如果拉取不下来,去修改镜像加速****/etc/docker/daemon.json****

{
"registry-mirrors": "https://docker.1panel.live", "https://hub.rat.dev", "https://docker.actima.top", "https://atomhub.openatom.cn", "https://docker.m.daocloud.io", "https://docker.nastool.de", "https://dockerpull.org", "https://registry.dockermirror.com", "https://docker.m.daocloud.io", "https://docker.1ms.run", "https://docker.aityp.com", "https://dockerhub.xisoul.cn", "https://docker.imgdb.de", "https://hub.littlediary.cn", "https://docker.unsee.tech", "https://hub.crdz.gq", "https://hub.firefly.store", "https://docker.kejilion.pro", "https://dhub.kubesre.xyz", "https://hub.xdark.top", "https://docker.udayun.com"
}

登录zabbix

访问地址: http://hostname:port" 0.0.0.0:8090

用户名: Admin (区分大小写)

密码: zabbix

Centos 客户端

root@localhost \~# ping www.baidu.com ping通网络

rpm -ivh https://repo.zabbix.com/zabbix/4.2/rhel/7/x86_64/zabbix-release-4.2-1.el7.noarch.rpm //zabbix的yum源

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
/ /阿里的网络yum源 这些网络yum源都是用来解决依赖关系的

yum -y install epel-release / /安装epel源 ,软件仓库

yum -y install zabbix-agent zabbix-sender

cd /etc/zabbix/

cp zabbix_agentd.conf zabbix_agentd.conf.bak // 备份

vim zabbix_agentd.conf

98 Server=192.168. 1 00. 88(改为自己虚拟机的ip)

106 ListenPort=10050

114 ListenIP=0.0.0.0

123 StartAgents=3

139 ServerActive=192.168. 1 00. 88

150 Hostname= node 1

hostnamectl set-hostname node1 / / 设置主机名为node 1

systemctl start zabbix-agent

netstat -anput | grep 10050

ubuntu 客户端(192.168.1 00 .202)

1)更新系统

root@ubuntu:~#sudo apt update && sudo apt upgrade -y

2)添加zabbix仓库

wget https://repo.zabbix.com/zabbix/7.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_7.0-2+ubuntu22.04_all.deb

sudo dpkg -i zabbix-release_7.0-2+ubuntu22.04_all.deb

sudo apt update

3)安装zabbix agent2

root@ubuntu:~# sudo apt install -y zabbix-agent2

4)编辑agent配置文件,企业环境记得提前备份

root@ubuntu:~# sudo vim /etc/zabbix/zabbix_agent2.conf

98 Server=192.168. 1 00. 202

106 ListenPort=10050

114 ListenIP=0.0.0.0

123 StartAgents=3

139 ServerActive=192.168. 1 00. 202

150 Hostname= node 1

5)启动并验证服务

root@ubuntu:~# sudo systemctl start zabbix-agent2

root@ubuntu:~#sudo systemctl status zabbix-agent2

6)设置开机自启动

root@ubuntu:~# sudo systemctl enable zabbix-agent2

Windows 客户端(192.168.1 00 .102)

Download Zabbix agents 官网下载windows安装插件

创建主机组

点击模板选择os linux

打开图形的预览:

相关推荐
RainCity18 小时前
Java Swing 自定义组件库分享(十二)
java·笔记·后端
LinXunFeng8 天前
Obsidian - 使用 Share Note 分享笔记并自部署
前端·笔记·github
闪闪发亮的小星星13 天前
高斯光以及高斯光公式解释
笔记
cqbzcsq13 天前
CellFlow虚拟细胞论文阅读
论文阅读·人工智能·笔记·学习·生物信息
阿米亚波13 天前
【Windows】QEMU 启动 openEuler aarch64/arm64 架构系统 + 离线软件源
linux·windows·经验分享·笔记·架构·arm
自传.13 天前
尚硅谷 Vibe Coding|第三章(1) Claude Code深度使用与进阶技巧 学习笔记
笔记·学习·尚硅谷·vibecoding
.千余13 天前
【C++】模板进阶全解:非类型参数|全特化|偏特化|分离编译完全指南
开发语言·c++·笔记·学习·其他
自传.13 天前
尚硅谷 Vibe Coding|第二章 AI编程工具生态 学习笔记
笔记·学习·ai编程·尚硅谷·vibe coding
秋波。未央13 天前
Java Agent 开发 · Day 1 学习笔记(含作业完整标准答案)
java·笔记·学习
中屹指纹浏览器13 天前
2026指纹浏览器字体指纹、字体渲染偏差检测与全维度虚拟字体池搭建方案
经验分享·笔记