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**** ![](https://i-blog.csdnimg.cn/direct/f024880543c94b90ba29660145ad2b23.png) ****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](https://www.zabbix.com/download_agents?version=6.4&release=6.4.1&os=Windows&os_version=Any&hardware=amd64&encryption=OpenSSL&packaging=MSI&show_legacy=0 "Download Zabbix agents") 官网下载windows安装插件 ![](https://i-blog.csdnimg.cn/direct/3b0ffa48ce2d49fbbf260f0bf0204a11.png) ![](https://i-blog.csdnimg.cn/direct/588814c7e95746dabee811d184cb1783.png) ![](https://i-blog.csdnimg.cn/direct/4525a75a5f6e4a5f8cd3ec25e8e9f2d8.png) ![](https://i-blog.csdnimg.cn/direct/ff7208535da54ae7b1a92cbe6eafb6dd.png) ![](https://i-blog.csdnimg.cn/direct/bb7accfb44444cc6905d9bfde458b81e.png) ![](https://i-blog.csdnimg.cn/direct/4ff4ba5562714fb781e38c7d0d33da8c.png) ![](https://i-blog.csdnimg.cn/direct/90de4e3896f54131bbea233ce008ebc8.png) ****创建主机组**** ![](https://i-blog.csdnimg.cn/direct/81dd6ed93ccd46be8e35d2ab3ff752d6.png) ![](https://i-blog.csdnimg.cn/direct/77b10c4578dc4c44990d874336a17d87.png) ![](https://i-blog.csdnimg.cn/direct/07848ced87c74fc8ab214ffde9efc8fc.png) ![](https://i-blog.csdnimg.cn/direct/87ab5822a78d46b297cb774fbc0c94cd.png) ****点击模板选择os linux**** ![](https://i-blog.csdnimg.cn/direct/6c5cbef77e7040feb94e78409f4eb17f.png) ![](https://i-blog.csdnimg.cn/direct/7a8df467d6c14e04b6363487ab081b66.png) ![](https://i-blog.csdnimg.cn/direct/e4ede1279f2b414aba9236e7f5cf2475.png) ![](https://i-blog.csdnimg.cn/direct/ccdd3245d02e4f3d98493fab03ac29fc.png) ****打开图形的预览:**** ![](https://i-blog.csdnimg.cn/direct/cf6ed7f100a94c17b7ecd1f08ca964e5.png)

相关推荐
killer Curry2 小时前
Polar CTF PWN 简单(1)(持续更新)
笔记·python·算法
北岛寒沫2 小时前
北京大学国家发展研究院 中国经济专题 课程笔记(第一课 绪论)
经验分享·笔记·学习
無限進步D3 小时前
高精度算法 cpp
c++·笔记·算法·入门
古一木3 小时前
ai学习笔记
笔记
1104.北光c°5 小时前
我理解的Leaf号段模式:美团分布式ID生成系统
java·开发语言·笔记·分布式·github·leaf
就叫飞六吧5 小时前
两步实现支付宝沙箱
笔记
Stream_Silver5 小时前
【系统架构设计师】第一章 计算机硬件 1.1 计算机硬件组成
笔记·硬件架构
山川行5 小时前
Git学习笔记:Git进阶操作
笔记·git·vscode·学习·编辑器·visual studio code
CDN3605 小时前
运维笔记|360CDN高防服务器部署教程,抗D+源站防护一站式配置
运维·服务器·笔记