当前位置:网站首页>The company needs to be monitored. How do ZABBIX and Prometheus choose? That's the right choice!
The company needs to be monitored. How do ZABBIX and Prometheus choose? That's the right choice!
2022-07-04 23:37:00 【Java technology stack】
source :cnblogs.com/xiaoyuxixi/p/12235979.html
New companies need to be monitored , The interview mentioned Prometheus It is the monitoring solution that the company needs , Of course, I chose to follow the trend .
The main thing I did before was Zabbix, Since the company needs Prometheus, There's no way out. , Only a good comparison , Get to know , After all, the skill is not too much .
But a little deeper , I realized Prometheus The advantages of , Summarize these two monitoring methods .
A brief history of the two monitoring tools
Prometheus
Kubernetes since 2012 Since its open source in, it has become an irresistible leader in scheduling and scheduling in the container field .
Kubernetes yes Google Borg Open source implementation of the system , Corresponding to this Prometheus It is Google BorgMon Open source implementation .
Prometheus By SoundCloud Open source monitoring and alarm system and time series database developed .
Literally ,Prometheus It consists of two parts , One is the monitoring and alarm system , The other is its own time series database (TSDB).
2016 year , from Google Sponsored Linux The original cloud foundation under the foundation (Cloud Native Computing Foundation) take Prometheus Included in its second largest open source project .
Prometheus It's also very active in the open source community , stay GitHub I have more than 20000 Star, And the system will have a small version update every two weeks , and Prometheus With its “ Elder martial brother ”Kubernetes All have their own aura of cloud origin , Nature can be friendly and cooperative .
Zabbix
Zabbix The official release date can be traced back to 2012 year , Time is better than Prometheus Four years earlier .
Zabbix By Alexei Vladishev Open source distributed monitoring system , It is an enterprise level distributed open source monitoring scheme . Software that can monitor various network parameters and server health and integrity . Use flexible notification mechanisms , Allows users to configure mail based alerts for almost any event .
In this way, we can quickly feed back the problems of the server . Based on stored data , Provides excellent reporting and data visualization capabilities .
Architecture contrast
Prometheus
Prometheus The basic principle of HTTP Periodically grab the status of the monitored component , Any component only needs to provide corresponding HTTP Interface and conform to Prometheus Defined data format , You can access it Prometheus monitor .
Prometheus Server Be responsible for grasping the target regularly Metrics( indicators ) The data is stored in local storage .
Prometheus One was adopted Pull( PULL ) How to get data , Not only does it reduce the complexity of the client , The client only needs to collect data , No need to know about the server side , And the server can be more convenient for horizontal expansion .
If the monitoring data reaches the alarm threshold Prometheus Server Will pass HTTP Send the alarm to the alarm module alertmanger, After the alarm is suppressed, the e-mail or webhook.
Prometheus Support PromQL Provide multi-dimensional data model and flexible query , By monitoring the indicators associated with multiple tag The way , Combine and aggregate the monitoring data in any dimension .
Zabbix
Zabbix from 2 Part of the form ,Zabbix Server With optional components Zabbix Agent.Zabbix Server Can pass SNMP,Zabbix Agent,ping, Port monitoring and other methods are provided for remote servers / Monitoring of network status , Data collection and other functions .
It can run in Linux,Solaris,HP-UX,AIX,Free BSD,Open BSD,OS X Platforms such as .
The core components are mainly Agent and Server, among Agent It is mainly responsible for collecting data and sending it to Server/Proxy, besides , To extend the monitor ,Agent It also supports the execution of custom scripts .
Server Mainly responsible for receiving Agent Monitoring information sent , And carry out summary storage , Trigger alarm, etc .
Zabbix Server Store the collected monitoring data in Zabbix Database in .Zabbix Database Support common relational database , If MySQL、PostgreSQL、Oracle etc. , The default is MySQL, And provide Zabbix Web page (PHP To write ) Data query .
Zabbix Because of the use of relational data to store temporal data , Therefore, when monitoring large-scale clusters, it is often difficult to save data .
So from Zabbix 4.2 Support for TimescaleDB Time series database , But the maturity is not high yet .
Comprehensive comparison
The table above , In terms of development language , In order to meet the needs of high concurrency and fast iteration , The development language of the monitoring system has gradually changed from C Language transfer to Go.
Have to say ,Go With simple syntax and elegant concurrency , stay Java Occupy business development ,C In the case of occupying the bottom development , Positioning middleware development requirements accurately , It is widely used in current open source middleware products .
In terms of system maturity ,Zabbix It's an old monitoring system :Zabbix Is in 1998 It came out in , The system function is relatively stable , Higher maturity .
and Prometheus It was born in recent years , Although the functions are still being updated iteratively , But on the shoulders of giants , In the architecture design, we have used the experience of many old monitoring systems for reference .
In terms of data storage ,Zabbix Using relational database to save , This greatly limits Zabbix Acquisition performance , and Prometheus Self developed a set of high performance time series database , stay V3 Version can reach tens of millions of data storage per second , Expand the storage of historical data by docking with the third-party time series database .
In terms of configuration complexity ,Prometheus There's only one core server Components , One command to start , Compared with , Other system configuration is relatively troublesome .
In terms of community activity , at present Zabbix More active , But it's basically domestic companies that participate in ,Prometheus In this respect, we have an absolute advantage , Although the community is not as active as , But by CNCF Support for , The later development is worth looking forward to .
From the perspective of container support , because Zabbix Appeared earlier , At that time, the container was not born , Naturally, the support for containers is also relatively poor .
and Prometheus Dynamic discovery mechanism , Not only can it support Swarm Native clusters , And support Kubernetes Monitoring of container clusters , It is the best solution for container monitoring at present .
summary
Taken together ,Zabbix More mature , It's faster to get started , But better integration leads to less flexibility , The bigger problem is , As the complexity of monitoring data increases ,Zabbix Further customization is very difficult , Even if customized , I can't use the data collected before ( Problems caused by relational databases ).
Prometheus Basically the opposite , It's more difficult to get started , But due to the high flexibility of customization , Data also has more aggregation possibilities , It is much less difficult to use after starting Zabbix.
But if you have accumulated technology in the traditional monitoring system , Or we should carefully consider changing the monitoring .
If you're monitoring a physical machine , use Zabbix No problem ,Zabbix In traditional monitoring system , Especially in server related monitoring , Take the absolute advantage of .
Even when the environment does not change very frequently ,Zabbix It's better than Prometheus Well done ; But if it's a cloud environment , Unless it is Zabbix Play very slippery , You can make all kinds of customization , Otherwise, or Prometheus Well , After all, that's what people do .
Prometheus It began to become the standard configuration of leading and container monitoring , And it will be widely used in the foreseeable future .
If it's just going to the monitoring system , Don't hesitate ,Prometheus It must be true .
Recent hot article recommends :
1.1,000+ Avenue Java Arrangement of interview questions and answers (2022 The latest version )
2. Explode !Java Xie Cheng is coming ...
3.Spring Boot 2.x course , It's too complete !
4. Don't write about the explosion on the screen , Try decorator mode , This is the elegant way !!
5.《Java Development Manual ( Song Mountain version )》 The latest release , Download it quickly !
I think it's good , Don't forget to like it + Forward !
边栏推荐
- Paddleocr tutorial
- 高通WLAN框架学习(30)-- 支持双STA的组件
- 【雅思阅读】王希伟阅读P3(Heading)
- Redis:Redis的事务
- French scholars: the explicability of counter attack under optimal transmission theory
- OSEK standard ISO_ 17356 summary introduction
- ECCV 2022 | 腾讯优图提出DisCo:拯救小模型在自监督学习中的效果
- Jar batch management gadget
- How to reduce the stock account Commission and stock speculation commission? Is it safe to open an online account
- Go pit - no required module provides Package: go. Mod file not found in current directory or any parent
猜你喜欢
CTF竞赛题解之stm32逆向入门
How to apply for PMP project management certification examination?
Blue sky nh55 series notebook memory reading and writing speed is extremely slow, solution process record
企业里Win10 开启BitLocker锁定磁盘,如何备份系统,当系统出现问题又如何恢复,快速恢复又兼顾系统安全(远程设备篇)
S32 design studio for arm 2.2 quick start
ICML 2022 || 3DLinker: 用于分子链接设计的E(3)等变变分自编码器
法国学者:最优传输理论下对抗攻击可解释性探讨
Redis:Redis消息的发布与订阅(了解)
公司要上监控,Zabbix 和 Prometheus 怎么选?这么选准没错!
QT drawing network topology diagram (connecting database, recursive function, infinite drawing, dragging nodes)
随机推荐
推荐收藏:跨云数据仓库(data warehouse)环境搭建,这货特别干!
Servlet服务器端和客户端中文输出乱码问题
[binary tree] the maximum difference between a node and its ancestor
Advantages of Alibaba cloud international CDN
法国学者:最优传输理论下对抗攻击可解释性探讨
Font design symbol combination multifunctional wechat applet source code
Fast analysis -- easy to use intranet security software
The input of uniapp is invalid except for numbers
[crawler] jsonpath for data extraction
In June, the list of winners of "Moli original author program" was announced! Invite you to talk about the domestic database
Application of machine learning in housing price prediction
Using the uniapp rich text editor
Redis:Redis的事务
跨域请求
How long does it take to obtain a PMP certificate?
如何在外地外网电脑远程公司项目?
MariaDB's Galera cluster application scenario -- multi master and multi active databases
List related knowledge points to be sorted out
Phpcms paid reading function Alipay payment
How to do the project of computer remote company in foreign Internet?