当前位置:网站首页>Monitoring - Prometheus introduction
Monitoring - Prometheus introduction
2022-07-04 03:06:00 【oyyy3】
Catalog
Two 、Prometheus characteristic
3、 ... and 、 Design idea of operation and maintenance monitoring platform
Four 、 Monitoring system system
1. System layer monitoring ( Data to be monitored )
2. Middleware and basic application monitoring End monitoring ( Move app, Specific procedures, etc )
3. Application layer monitoring
5、 ... and 、Prometheus Ecological components
One 、 Common monitoring
- cacti
- Nagios
- Zabbix
- Prometheus
- open-Falcaon
Two 、Prometheus characteristic
Multidimensional data model ( Based on time series Key、 value Key value pair )
Flexible query and aggregation language PromQL—— Be similar to mysql Of sql sentence
Provide local storage and distributed storage
Offer based on HTTP and HTTPS( Seven layers ) Of Pull The model collects time series data (pull Data push , The time series : Data value index at each time point , Continuous production . The horizontal axis identifies the time , The vertical axis is the data value , Dynamic change of values over a period of time , All the points and lines form a large-scale broken line chart )
available Pushgateway (Prometheus Optional middleware ) Realization Push Pattern ( Only execute the script or one time / Short cycle tasks , Use push The way ) For the seventh floor pull, For the fourth floor push
Target machines can be discovered through dynamic service discovery or static configuration ( adopt consul Auto discover and shrink )
Support a variety of charts and data ( Test with ) There are many visual icons and types
3、 ... and 、 Design idea of operation and maintenance monitoring platform
1. Data collection module
2. Data extraction module (prometheus-TSDB The query language is PromQL)
3. Monitoring alarm module ( The Boolean expression determines whether an alarm is required PromQL (CPU Usage rate )>80%)
Refine to
The sixth floor —— User presentation management —— Same user management 、 Centralized monitoring 、 Centralized maintenance
The fifth floor —— Alarm event generation layer —— Record alarm events in real time 、 Form analysis chart ( Trend analysis 、 visualization )
The fourth level —— Alarm rule configuration layer —— Alarm rule settings 、 Alarm value setting ( Define Boolean expressions , Filter exception status )
The third level —— Data extraction layer —— Regularly collect data to the monitoring module
The second floor —— Data presentation layer —— Data generation curve display ( Dynamic display of time series data )
first floor —— Data collection layer ——( Multi channel monitoring data )——( The Internet , Hardware , application , data , Physical environment )
Four 、 Monitoring system system
1. System layer monitoring ( Data to be monitored )
2. Middleware and basic application monitoring End monitoring ( Move app, Specific procedures, etc )
3. Application layer monitoring
There are three ways to grab from the target (scrape) Indicator data :
Exporters ——> Working at the monitored end , Periodically grab data and convert it into pro Compatible format wait prometheus To collect , I don't push
Instrumentation( Built in indicator exposure device ) ——> It means that the monitored object has its own data collection 、 Monitoring function , It only needs prometheus Go straight to get ——docker
Pushgateway ——> Short period 5s—10s Data collection of , Or it is not suitable to pass / Use 7 Index data of layer exposure
4. Business layer monitoring
5、 ... and 、Prometheus Ecological components
1.Prometheus Server: Collect and store time series data adopt scraping Get data by scraping storge(TSDB Time series database ), To develop Rules/Alerts: Alarm rules ,service discovery Is to automatically discover the nodes to be monitored
2.Client Library: Client library , The purpose is to provide... For those who want to be native Instrumentation Functional applications provide a convenient way to develop ;
3.Push Gateway: A gateway that receives metric data typically generated by short-term jobs , And supported by Prometheus Server Pull the index ;
4.Exporters: Used to expose existing applications or services ( I won't support it Instrumentation) The indicators for Prometheus Server and pro Built in data sample collector , Can be defined through the configuration file , tell prometheus Collect indicator data from that monitoring object ,prometheus After collection , Will be stored in their own built-in TSDB In the database , Provides promQL Support query and filter operations , At the same time, user-defined rules are supported as alarm rules , Continuously analyze an index , Once occurred , Notified to alerter To send alarm information , It also supports docking with external UI Tools (grafana) To show the data . collection 、 Capturing data is its own function , But the data that is usually caught comes from :export/instrumentation ( Indicator data exposure device ) To complete , Or the measurement system built in the application itself ( Car dashboard and so on , measurement 、 Exhibition ) To complete
5.Alertmanager: Connect by alarm rules , from Prometheus Server Received " Warning notice " after , By weight removal 、 branch Group 、 After routing and other preprocessing functions, the alarm information can be sent to the user efficiently
6.Data Visualization(Dashboards): And TSDB Dock and display the data in the database ,Prometheus web UI (Prometheus Server The built-in ), And Grafana etc. ;
7.Service Discovery: Dynamically discover the to be monitored Target, This completes the important components of the monitoring configuration , Especially useful in containerized environments ; This component is currently made up of PropetheusServer Built in support
6、 ... and 、prometheus Data model ( What is a label ( Label value )、 What is an indicator 、 What samples are )
What is an indicator : Specific objects that can generate monitoring data . for example cpu Usage rate , Memory free rate is an indicator
What is a label , What is tag value : According to the index name / object , Filter indicator data accurately according to specific conditions , Tags and tag values
Tags and tag values , It is the screening method and basis of indicator data .
The index type
The default is to use Double precision floating point data ( The server has no data type )
- ① counter : The counter is monotonically incremented
- ② gauge: The dashboard : Characterized by undulations
- ③ histogram: Histogram
- ④ summary, Abstract ,histogram Extension type of histogram
边栏推荐
- Crawler practice website image batch download
- Package and download 10 sets of Apple CMS templates / download the source code of Apple CMS video and film website
- Contest3145 - the 37th game of 2021 freshman individual training match_ G: Score
- (practice C language every day) pointer sorting problem
- Zhihu million hot discussion: why can we only rely on job hopping for salary increase? Bosses would rather hire outsiders with a high salary than get a raise?
- Www 2022 | taxoenrich: self supervised taxonomy complemented by Structural Semantics
- Base d'apprentissage de la machine: sélection de fonctionnalités avec lasso
- Résumé des outils communs et des points techniques de l'examen PMP
- Leetcode 110 balanced binary tree
- In my spare time, I like to write some technical blogs and read some useless books. If you want to read more of my original articles, you can follow my personal wechat official account up technology c
猜你喜欢
VRRP+BFD
Webhook triggers Jenkins for sonar detection
Cache general management class + cache httpcontext Current. Cache and httpruntime Differences between caches
Unity knapsack system (code to center and exchange items)
Solve the problem that the tabbar navigation at the bottom of vantui does not correspond to the page (window.loading.hash)
ZABBIX API pulls the values of all hosts of a monitoring item and saves them in Excel
AI 助力藝術設計抄襲檢索新突破!劉芳教授團隊論文被多媒體頂級會議ACM MM錄用
Fudan released its first review paper on the construction and application of multimodal knowledge atlas, comprehensively describing the existing mmkg technology system and progress
No clue about the data analysis report? After reading this introduction of smartbi, you will understand!
The difference between MCU serial communication and parallel communication and the understanding of UART
随机推荐
Key knowledge of C language
Node solves cross domain problems
This function has none of DETERMINISTIC, NO SQL..... (you *might* want to use the less safe log_bin_t
Teach you how to optimize SQL
Osnabrueck University | overview of specific architectures in the field of reinforcement learning
Li Chuang EDA learning notes IX: layers
PHP database connection succeeded, but data cannot be inserted
7 * 24-hour business without interruption! Practice of applying multiple live landing in rookie villages
Contest3145 - the 37th game of 2021 freshman individual training match_ D: Ranking
在尋求人類智能AI的過程中,Meta將賭注押向了自監督學習
Rhcsa day 2
Cache general management class + cache httpcontext Current. Cache and httpruntime Differences between caches
Package and download 10 sets of Apple CMS templates / download the source code of Apple CMS video and film website
C language black Technology: Archimedes spiral! Novel, interesting, advanced~
Hospital network planning and design document based on GLBP protocol + application form + task statement + opening report + interim examination + literature review + PPT + weekly progress + network to
The "message withdrawal" of a push message push, one click traceless message withdrawal makes the operation no longer difficult
Solve the problem that the tabbar navigation at the bottom of vantui does not correspond to the page (window.loading.hash)
[development team follows] API specification
[Wu Enda deep learning] beginner learning record 3 (regularization / error reduction)
Buuctf QR code