当前位置:网站首页>8.zabbix分布式
8.zabbix分布式
2022-07-22 00:18:00 【三七的运维日志】
分布式
zabbix proxy 可以代替 zabbix server 收集性能和可用性数据,然后把数据汇报给 zabbix server,并且在一定程度上分担了zabbix server 的压力。此外,当所有agents和proxies报告给一个Zabbix server并且所有数据都集中收集时,使用proxy是实现集中式和分布式监控的最简单方法
zabbix proxy 使用场景:
- 监控远程区域设备
- 监控本地网络不稳定区域
- 当 zabbix 监控上千设备时,使用它来减轻 server 的压力,达到负载均衡
- 简化分布式监控的维护
架构图
分布式安装
#环境
server 5.4
proxy 5.5
agent 5.6
#防火墙关闭,关闭自动发现,自动注册
systemctl stop firewalld
setenforce 0
#服务端无需操作,默认安装即可
#agent2端默认安装
#proxy端如果安装了agent2,关闭
systemctl stop zabbix-agent2
#配置proxy服务器,部署proxy,部署数据库,如果没有配置阿里云的zabbix源,则配置,参考安装
yum -y install zabbix-proxy-mysql zabbix-get #zabbix-proxy-mysql连接数据库使用
yum -y install mariadb-server mariadb
systemctl start mariadb
#配置proxy的数据库
mysql -uroot -p
MariaDB [(none)]> set password=password('Root000.');
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> create database zabbix_proxy character set utf8 collate utf8_bin;
Query OK, 1 row affected (0.00 sec)
MariaDB [(none)]> grant all privileges on zabbix_proxy.* to 'zabbix'@'localhost' identified by 'Root000.';
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> flush privileges;
Query OK, 0 rows affected (0.00 sec)
exit
#导入sql数据
rpm -ql zabbix-proxy-mysql
/usr/share/doc/zabbix-proxy-mysql-5.0.25/schema.sql.gz
zcat /usr/share/doc/zabbix-proxy-mysql-5.0.25/schema.sql.gz | mysql -uzabbix -p'Root000.' zabbix_proxy
#查看数据库是否导入成功
MariaDB [(none)]> use zabbix_proxy;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
MariaDB [zabbix_proxy]> show tables;
+----------------------------+
| Tables_in_zabbix_proxy |
+----------------------------+
| acknowledges |
exit
#修改zabbix-proxy配置文件
cp /etc/zabbix/zabbix_proxy.conf /etc/zabbix/zabbix_proxy.bak
vim /etc/zabbix/zabbix_proxy.conf
30 Server=192.168.5.4 #服务端地址
49 Hostname=zbx1 #本机的主机名
DBName=zabbix_proxy
DBUser=zabbix
196 DBPassword=Root000.
#启动代理服务
systemctl start zabbix-proxy
#服务端配置解析
vim /etc/hosts
192.168.5.4 localhost.localdomain
192.168.5.5 zbx1
192.168.5.6 zbx2
#检测日志
tail -f /var/log/zabbix/zabbix_server.log
server配置客户端
添加agent节点
#把server地址配置为proxy
vim /etc/zabbix/zabbix_agent2.conf
Server=192.168.5.5
ServerActive=192.168.5.5
Hostname=zbx2
HostnameItem=system.hostname
systemctl restart zabbix-agent2
等待查看配置,主机
出现问题
1.检查配置文件,主要检查server hostname
2.重启服务proxy和agent
32721)]
[外链图片转存中…(img-fs99H3dN-1658374932721)]
等待查看配置,主机
出现问题
1.检查配置文件,主要检查server hostname
2.重启服务proxy和agent
边栏推荐
- Mass region cluster tuning best practices
- Microservice practice | centralized configuration center config symmetric encryption practice
- Network metering - transport layer
- Job hopping? Have you got the 7 skills you need to master in the interview software test?
- [Extension announcement] 2022 international joint civil and Offshore Engineering Conference (jccme 2022)
- Do you have to follow flush privileges after MySQL grant?
- Esp8266 analog input (ADC) detection problem
- Rare earth Developers Conference | streamnational Zhai Jia and Liu Dezhi share the road of cloud native technology transformation
- Apachecon Asia 2022 opens registration: pulsar technology issues make a big debut
- Cohérence finale transactions distribuées STC
猜你喜欢
What should we pay attention to in writing automated test resumes? What are the skills?
After reading this, I can't DVMA yet. Please eat melon
酷早报:7月21日Web3加密行业新闻大汇总
Job hopping? Have you got the 7 skills you need to master in the interview software test?
Live review | wonderful playback of Apache pulsar meetup (including PPT download)
R Plot添加中文及其他字体【showtext】
Capacitive touch chip used in touch panel
MySQL grant之后一定要跟随flush privileges么?
Pads Sketchpad box
JUC processes and threads
随机推荐
正则 删除特定字符后面所有的元素(不区分大小写)
酷早报:7月21日Web3加密行业新闻大汇总
《天幕红尘》笔记与思考(二)你知道别人的认识和你自己知道
JUC-内存
c语言分层理解(c语言分支和循环语句)
NVIDIA可编程推理加速器TensorRT学习笔记(一)——开始
esp8266模拟输入(ADC)检测问题
Http实战之缓存、重定向
LeetCode刷题系列 -- 剑指 Offer 47. 礼物的最大价值
Sentinel vs Hystrix 限流对比,到底怎么选?
异常检测 and 自编码器(2)
In the software testing interview, the interviewer asks you some "difficult" questions. How will you answer them
Usage scenarios of stale read function
Advanced architects, 16 common principles of microservice design and Governance
AQS of concurrent memory model -- reentrantlock locking process
Android 面试题:说一下 PendingIntent 和 Intent 的区别
最终一致性性分布式事务 TCC
Hot pot restaurant ordering system based on ssm+jsp+mysql+h-ui
Idea décompile toute la source du paquet jar
Live review | wonderful playback of Apache pulsar meetup (including PPT download)