当前位置:网站首页>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 !
边栏推荐
- Réseau graphique: Qu'est - ce que le Protocole d'équilibrage de charge de passerelle glbp?
- 高通WLAN框架学习(30)-- 支持双STA的组件
- 【雅思阅读】王希伟阅读P4(matching1)
- CTF競賽題解之stm32逆向入門
- [kotlin] the third day
- 快解析——好用的内网安全软件
- 一次edu证书站的挖掘
- Fast analysis -- easy to use intranet security software
- How to reduce the stock account Commission and stock speculation commission? Is it safe to open an online account
- 端口映射和端口转发区别是什么
猜你喜欢
Redis: redis message publishing and subscription (understand)
Observable time series data downsampling practice in Prometheus
取得PMP证书需要多长时间?
Network namespace
端口映射和端口转发区别是什么
Réseau graphique: Qu'est - ce que le Protocole d'équilibrage de charge de passerelle glbp?
The initial arrangement of particles in SPH (solved by two pictures)
微服务(Microservice)那点事儿
Galera cluster of MariaDB - dual active and dual active installation settings
OSEK standard ISO_ 17356 summary introduction
随机推荐
Redis:Redis的事务
js正则表达式之中文验证(转)
【爬虫】数据提取之xpath
JS 将伪数组转换成数组
CTF竞赛题解之stm32逆向入门
In June, the list of winners of "Moli original author program" was announced! Invite you to talk about the domestic database
MP advanced operation: time operation, SQL, querywapper, lambdaquerywapper (condition constructor) quick filter enumeration class
go踩坑——no required module provides package : go.mod file not found in current directory or any parent
PICT 生成正交测试用例教程
Servlet服务器端和客户端中文输出乱码问题
高配笔记本使用CAD搬砖时卡死解决记录
Cross domain request
Blue sky nh55 series notebook memory reading and writing speed is extremely slow, solution process record
ECCV 2022 | 腾讯优图提出DisCo:拯救小模型在自监督学习中的效果
go踩坑——no required module provides package : go.mod file not found in current directory or any parent
Excel shortcut keys - always add
How to use fast parsing to make IOT cloud platform
基于三维gis平台的消防系统运用
MIT-6.824-lab4B-2022(万字思路讲解-代码构建)
Redis:Redis消息的发布与订阅(了解)