当前位置:网站首页>ZABBIX distributed
ZABBIX distributed
2022-07-28 14:21:00 【Bandiaozi refining whole stack】
zabbix Distributed
Zabbix proxy Use scenarios :
Monitoring remote area equipment Monitor local network instability areas
When monitoring thousands of devices , reduce zabbix server The load of
Simplify the maintenance of Distributed Monitoring .
When thousands of servers are monitored , Generally monitored Server There will be a lot of pressure , So there is distributed monitoring to share Server pressure , That is, add a proxy server , Function and Server almost , The proxy server collects agent The monitoring data is returned to Server To deal with .
zabbix proxy Just one tcp Connect to zabbix server, So just add a rule to the firewall zabbix proxy The database must be connected with server Separate , Otherwise the data will be destroyed
zabbix proxy After collecting the data , First, cache the data locally , And then pass it on to zabbix server, In this way, data will not be lost due to any temporary communication problems with the server . This time is by proxy Parameters in the configuration file ProxyLocalBuffer and ProxyOfflineBuffer decision
Experiment preparation
equipment 1、2 Build the environment before the blog , There is no building here
| host | ip |
|---|---|
| equipment 1 zabbix-server | 192.168.70.10 |
| equipment 3 zabbix-proxy | 192.168.70.30 |
| equipment 2 zabbix-agent | 192.168.70.20 |
equipment 3
[[email protected] ~]# ls
anaconda-ks.cfg sysconfigure.sh
[[email protected] ~]# bash sysconfigure.sh Execute the script to configure the environment
install matiadb-server
[[email protected] ~]# yum -y install mariadb-server
start-up mariadb
[[email protected] ~]# systemctl start mariadb
Start and start
[[email protected] ~]# systemctl enable mariadb
Access to database
[[email protected] ~]# mysql
establish zabbix_proxy library , And give utf8 Recognizable Chinese
MariaDB [(none)]> create database zabbix_proxy character set utf8 collate utf8_bin;
Query OK, 1 row affected (0.00 sec)
mysql to grant authorization zabbix_proxy User accessible zabbix_proxy All tables in the library
MariaDB [(none)]> grant all on zabbix_proxy.* to [email protected] identified by '123456';
Query OK, 0 rows affected (0.00 sec)
View Library
MariaDB [(none)]> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| test |
| zabbix_proxy |
+--------------------+
5 rows in set (0.00 sec)
To view the user
MariaDB [(none)]> select user,host from mysql.user;
+--------------+--------------+
| user | host |
+--------------+--------------+
| root | 127.0.0.1 |
| root | ::1 |
| | localhost |
| root | localhost |
| zabbix_proxy | localhost |
| | zabbix-proxy |
| root | zabbix-proxy |
+--------------+--------------+
7 rows in set (0.00 sec)
Modify hostname
[[email protected] ~]# hostnamectl set-hostname zabbix-proxy
[[email protected] ~]# exit
Network source
[[email protected] ~]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
[[email protected] ~]# wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-
Clear cache
[[email protected] ~]# yum clean all
[[email protected] ~]# yum makecache
Tsinghua University link download software zabbix-proxy-mysql-5.0.22-1.el7.x86_64.rpm
[[email protected] ~]# wget https://mirrors.tuna.tsinghua.edu.cn/zabbix/zabbix/5.0/rhel/
7/x86_64/zabbix-proxy-mysql-5.0.22-1.el7.x86_64.rpm
on connection mirrors.tuna.tsinghua.edu.cn (mirrors.tuna.tsinghua.edu.cn)|101.6.15.130|:443... Connected .
error : Can't verify mirrors.tuna.tsinghua.edu.cn By “/C=US/O=Let's Encrypt/CN=R3” Certificate issued :
The certificate issued has expired .
To connect to... In an unsafe manner mirrors.tuna.tsinghua.edu.cn, Use “--no-check-certificate”.
[[email protected] ~]# wget --no-check-certificate https://mirrors.tuna.tsinghua.edu.cn/
zabbix/zabbix/5.0/rhel/7/x86_64/zabbix-proxy-mysql-5.0.22-1.el7.x86_64.rpm
install
[[email protected] ~]# rpm -hvi zabbix-proxy-mysql-5.0.22-1.el7.x86_64.rpm
View each path
[[email protected] ~]# rpm -ql zabbix-proxy-mysql
/etc/logrotate.d/zabbix-proxy
/etc/zabbix/zabbix_proxy.conf
/usr/lib/systemd/system/zabbix-proxy.service
/usr/lib/tmpfiles.d/zabbix-proxy.conf
/usr/lib/zabbix/externalscripts
/usr/sbin/zabbix_proxy_mysql
/usr/share/doc/zabbix-proxy-mysql-5.0.22
/usr/share/doc/zabbix-proxy-mysql-5.0.22/AUTHORS
/usr/share/doc/zabbix-proxy-mysql-5.0.22/COPYING
/usr/share/doc/zabbix-proxy-mysql-5.0.22/ChangeLog
/usr/share/doc/zabbix-proxy-mysql-5.0.22/NEWS
/usr/share/doc/zabbix-proxy-mysql-5.0.22/README
/usr/share/doc/zabbix-proxy-mysql-5.0.22/schema.sql.gz
/usr/share/man/man8/zabbix_proxy.8.gz
/var/log/zabbix
/var/run/zabbix
Import the initial data table and schema table
[[email protected] ~]# zcat /usr/share/doc/zabbix-proxy-mysql-5.0.22/schema.sql.gz | mysql -uzabbix_proxy -p123456 zabbix_proxy
Modify the configuration file
[[email protected] ~]# vim /etc/zabbix/zabbix_proxy.conf
……
30 Server=192.168.70.10 # Appoint zabbix server The earth site
49 Hostname=Zabbix-proxy # Specify the local name ( Self determination The righteous ), be used for zabbix server Distinguish between each proxy node
173 DBName=zabbix_proxy # Specify the database name ( With the database The library name created should be consistent )
188 DBUser=zabbix_proxy # Specify the user name to connect to the database ( Consistent with the authorized user name of the database )
196 DBPassword=123456 # Specify user password
Turn on
[[email protected] ~]# systemctl start zabbix-proxy.service
restart
[[email protected] ~]# systemctl restart zabbix-proxy.service
Boot from boot
[[email protected] ~]# systemctl enable zabbix-proxy.service
Check the network port
[[email protected]y ~]# netstat -ntlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 16504/mysqld
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 6647/sshd
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 8010/master
tcp 0 0 0.0.0.0:10051 0.0.0.0:* LISTEN 27384/zabbix_proxy
tcp6 0 0 :::22 :::* LISTEN 6647/sshd
tcp6 0 0 ::1:25 :::* LISTEN 8010/master
tcp6 0 0 :::10051 :::* LISTEN 27384/zabbix_proxy
restart
[[email protected] ~]# systemctl restart zabbix-proxy.service
192.168.70.20 equipment
Modify the configuration file
[[email protected] ~]# vim /etc/zabbix/zabbix_agentd.conf
……
119 Server=192.168.70.30 # Appoint zabbix proxy Address
ServerActive=127.0.0.1 The machine itself
171 Hostname=192.168.70.20 # Specify the local name ( Self determination The righteous ), be used for zabbix proxy Distinguish between each agent node
restart
[[email protected] ~]# systemctl restart zabbix-agent.service
Check the network port
[[email protected] ~]# netstat -ntpl
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 6802/nginx: master
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 6672/sshd
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 6883/master
tcp 0 0 0.0.0.0:10050 0.0.0.0:* LISTEN 12480/zabbix_agentd
tcp6 0 0 :::22 :::* LISTEN 6672/sshd
tcp6 0 0 ::1:25 :::* LISTEN 6883/master
tcp6 0 0 :::10050 :::* LISTEN 12480/zabbix_agentd
[[email protected] ~]# systemctl restart zabbix-agent.service
Enter the interface at management ——>agent agent 
To configure ——> host ——>
Template selection to update 
Main engine Update again 
To configure ——> host The place marked with red indicates normal 
here ZBX If it doesn't light up from zabbix-server zabbix-proxy zbbix-agent Restart once . If it is invalid, delete the template and select again to update Host update attempt .
Solution references
https://blog.csdn.net/weixin_30776545/article/details/99486652
https://blog.csdn.net/weixin_44234846/article/details/99621182?utm_term=zabbix%E7%9A%84ZBX%E6%B2%A1%E4%BA%AE&utm_medium=distribute.pc_aggpage_search_result.none-task-blog-2allsobaiduweb~default-2-99621182-null-null&spm=3001.4430
zabbix Distributed build article
https://www.cnblogs.com/ywb-articles/p/11826613.html
Here is the reference
边栏推荐
- How did Dongguan Huawei cloud data center become a new model of green data center?
- 超好用的手机录屏软件推荐
- Clickhouse架构与设计
- Verification code brute force cracking test [easy to understand]
- Several efficient APIs commonly used in inventory operation URL
- Foundation of deep learning ---- GNN spectral domain and airspace (continuous improvement, update and accumulation)
- Collaborative office tools: Online whiteboard is in its infancy, and online design has become a red sea
- Development and definition of software testing
- Jmeter安装教程及登录增加token
- Slam thesis collection
猜你喜欢

zabbix分布式

文献阅读(245)Roller

Target detection: speed and accuracy comparison (fater r-cnn, r-fcn, SSD, FPN, retinanet and yolov3)

开源项目丨Taier1.2版本发布,新增工作流、租户绑定简化等多项功能

What is a spin lock? A spin lock means that when a thread attempts to acquire a lock, if the lock has been occupied by other threads, it will always cycle to detect whether the lock has been released,

Leetcode 0142. circular linked list II

How to effectively conduct the review meeting (Part 1)?

Thrift 序列化协议浅析

Minitest -- applet automation testing framework

如何有效进行回顾会议(上)?
随机推荐
JMeter installation tutorial and login add token
协同办公工具:在线白板初起步,在线设计已红海
Thoroughly master binary search
QT自制软键盘 最完美、最简单、跟自带虚拟键盘一样
【翻译】如何为你的私有云选择一个网络网关
开源项目丨Taier1.2版本发布,新增工作流、租户绑定简化等多项功能
阿里、京东、抖音:把云推向产业心脏
[ecmascript6] set and map
QML picture preview
Three cases of thread blocking.
Several solutions to spanning
On websocket
MVC model: calendar system
QQ robot configuration record based on nonebot2
Understand BFC features and easily realize adaptive layout
What is a spin lock? A spin lock means that when a thread attempts to acquire a lock, if the lock has been occupied by other threads, it will always cycle to detect whether the lock has been released,
Super resolution reconstruction based on deep learning
Multi level cache scheme
83.(cesium之家)cesium示例如何运行
Clickhouse distributed cluster construction