当前位置:网站首页>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
边栏推荐
- Cache general management class + cache httpcontext Current. Cache and httpruntime Differences between caches
- 17. File i/o buffer
- Sword finger offer:55 - I. depth of binary tree
- Global and Chinese market for travel wheelchairs 2022-2028: Research Report on technology, participants, trends, market size and share
- 在尋求人類智能AI的過程中,Meta將賭注押向了自監督學習
- WP collection plug-in free WordPress collection hang up plug-in
- [untitled] the relationship between the metauniverse and digital collections
- Short math guide for latex by Michael downs
- Bugku Zhi, you have to stop him
- Record a problem that soft deletion fails due to warehouse level error
猜你喜欢

(column 23) typical C language problem: find the minimum common multiple and maximum common divisor of two numbers. (two solutions)

ZABBIX API pulls the values of all hosts of a monitoring item and saves them in Excel

The difference between MCU serial communication and parallel communication and the understanding of UART

SQL injection (1) -- determine whether there are SQL injection vulnerabilities

Redis transaction

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

Code Execution Vulnerability - no alphanumeric rce create_ function()

Node solves cross domain problems

FRP intranet penetration

Add token validation in swagger
随机推荐
Redis transaction
Command Execution Vulnerability - command execution - vulnerability sites - code injection - vulnerability exploitation - joint execution - bypass (spaces, keyword filtering, variable bypass) - two ex
Global and Chinese market of cell scrapers 2022-2028: Research Report on technology, participants, trends, market size and share
SQL injection (1) -- determine whether there are SQL injection vulnerabilities
Global and Chinese markets of advanced X-ray inspection system (Axi) in PCB 2022-2028: Research Report on technology, participants, trends, market size and share
MySQL data query optimization -- data structure of index
Mysql to PostgreSQL real-time data synchronization practice sharing
The difference between MCU serial communication and parallel communication and the understanding of UART
false sharing
Database concept and installation
Contest3145 - the 37th game of 2021 freshman individual training match_ 1: Origami
Advanced learning of MySQL -- Application -- index
Global and Chinese market of box seals 2022-2028: Research Report on technology, participants, trends, market size and share
MySQL workbench use
ZABBIX API pulls the values of all hosts of a monitoring item and saves them in Excel
MySQL query
ZABBIX API batch delete a template of the host
Record a problem that soft deletion fails due to warehouse level error
WordPress collection WordPress hang up collection plug-in
Recent learning fragmentation (14)