简单监控(server-client)
docker-compose.yml
version: "3.2"
services:
zabbix_server:
image: "zabbix/zabbix-appliance"
container_name: "zabbix_server"
networks:
- auto-cmdb_jumpserver-test
expose:
- "80"
tty: true
zabbix_client:
image: "centos:latest"
container_name: "zabbix_client"
networks:
- auto-cmdb_jumpserver-test
tty: true
networks:
auto-cmdb_jumpserver-test:
配置
1.浏览器访问zabbix_server的IP:80
可以进入到zabbix
初始帐号密码: Admin
zabbix
2.以上没问题开始配置agent
docker exec -it zabbix_client bash
rpm -Uvh https://repo.zabbix.com/zabbix/4.4/rhel/7/x86_64/zabbix-release-4.4-1.el7.noarch.rpm
#安装环境库
yum install zabbix-agent
#安装客户端
rpm -ql zabbix-agent
#查看有哪些包,启动文件
vi /etc/zabbix/zabbix_agentd.conf
改变三行命令
Server=172.29.0.2 #这个IP为zabbix_server的IP
ServerActive=172.29.0.2 #这个IP为zabbix_server的IP
Hostname=2039bd2bbe81 #本容器ID编号
保存退出后,zabbix_agentd
来启动agent
进入web界面配置监控
配置--》主机 ---》右上角 创建主机





配置完这个保证ZBX为绿色

网友评论