当前位置:网站首页>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 !
边栏推荐
- ICML 2022 || 3DLinker: 用于分子链接设计的E(3)等变变分自编码器
- Intelligence test to see idioms guess ancient poems wechat applet source code
- MariaDB's Galera cluster application scenario -- multi master and multi active databases
- The pit of sizeof operator in C language
- Go pit - no required module provides Package: go. Mod file not found in current directory or any parent
- ECCV 2022 | Tencent Youtu proposed disco: the effect of saving small models in self supervised learning
- 【雅思阅读】王希伟阅读P4(matching1)
- Jar batch management gadget
- 【爬虫】数据提取之xpath
- JS 将伪数组转换成数组
猜你喜欢

ECCV 2022 | Tencent Youtu proposed disco: the effect of saving small models in self supervised learning

A mining of edu certificate station
![[kotlin] the third day](/img/c4/1bf1b00c4a1dda920ad3bb178ac0f9.png)
[kotlin] the third day

PMP证书续证流程

Redis: redis transactions

基于三维gis平台的消防系统运用

使用快解析搭建自己的minecraft服务器

How to use fast parsing to make IOT cloud platform

如何避免电弧产生?—— AAFD故障电弧探测器为您解决

How long does it take to obtain a PMP certificate?
随机推荐
高通WLAN框架学习(30)-- 支持双STA的组件
C语言中sizeof操作符的坑
After Microsoft disables the IE browser, open the IE browser to flash back the solution
phpcms付费阅读功能支付宝支付
45岁教授,她投出2个超级独角兽
ECCV 2022 | 腾讯优图提出DisCo:拯救小模型在自监督学习中的效果
Fast parsing intranet penetration helps enterprises quickly achieve collaborative office
香港珠宝大亨,22亿“抄底”佐丹奴
The initial trial is the cross device model upgrade version of Ruijie switch (taking rg-s2952g-e as an example)
CTF競賽題解之stm32逆向入門
如何在外地外网电脑远程公司项目?
[Taichi] change pbf2d (position based fluid simulation) of Taiji to pbf3d with minimal modification
HMS core unified scanning service
Header file duplicate definition problem solving "c1014 error“
使用快解析搭建自己的minecraft服务器
Redis:Redis消息的发布与订阅(了解)
45 year old professor, she threw two super unicorns
PMP certificate renewal process
ICML 2022 | 3dlinker: e (3) equal variation self encoder for molecular link design
[crawler] XPath for data extraction