当前位置:网站首页>【Prometheus】2. Overview and deployment
【Prometheus】2. Overview and deployment
2022-06-24 16:15:00 【Try something new for a long time】
summary
1. Prometheus What is it?
brief introduction
Prometheus By SoundCloud Open source monitoring alarm solution .2012 Became open source in the community , Have a very active developer and user community ,Prometheus On 2016 Joined cloud native Computing Foundation in (CNCF), To become a successor k8s And then the second hosting project .
https://prometheus.io/
https://github.com/prometheus
characteristic
- Multidimensional data model : Time series data indicated by the measurement name and key value pair
- PromSQL: A flexible query language , Complex queries can be performed using multidimensional data
- Independent of distributed storage , A single service node can work directly
- be based on HTTP Of pull Method to collect time series data
- Push time series data through PushGateWay Component support
- Discover targets through service discovery or static configuration
- Various graphic models and dashboard support
2. Prometheus Composition and architecture
- Data collection :
- Push gateway: Short term storage of indicator data , Mainly used for temporary tasks
- jobs/exporters: Collect the existing monitoring indicators of third-party services and expose them metrics, similar sql/http Mission , adopt jobs( similar http Will expose metrics Interface supply Prometheus Grab ) perhaps exporters( monitor agent, Get different data sources , Re pass Prometheus serve Grab )
- Prometheus Server: Collect and store time series databases , And provide query interface
- Service discovery: Service discovery and monitoring native support k8s All round monitoring
- WEB UI: adopt PromQL View the data ,Prometheus web UI( ordinary web Console ),grafana,API clients
- Alertmanager: Monitoring alarm assembly , Support email/wechat
- ClientLibray: Client library , Support python java golang etc. , Support exposure metrics
3. Data model
- Prometheus Store all data as time series , Have the same measurement name and label belong to the same indicator ;
- Each time series has a metric name and a set of key value pairs ( Also known as label )
- Time series format : <metric name>{<label name>=<label value>, ...}
Example :api_http_requests_total{method="POST", handler="/messages"}
4. The index type
- counter: Incremented counter
- gauge: Any number that can be changed
- histogram: Sampling data over a period of time , And sum up all data values and count the quantity
- summary: And histogram similar
5. Assignments and examples
example : Objects that can be captured become instances (Instances)
Homework : A collection of instances with the same target is called a job (jobs)
Deploy
1. Binary deployment
- Download binary package :prometheus.io
- decompression prometheus:tar -zxvf prometheus-2.26.0.linux-amd64.tar.gz
- Modify working directory :mv prometheus-2.26.0.linux-amd64 /usr/local/prometheus
- Enter working directory :cd /usr/local/prometheus
- Check the parameter description :./prometheus --help
- Configure the service :
- cd /usr/lib/systemd/system
- vim prometheus.service
- systemctl daemon-reload
- Start the service :systemctl start prometheus
- Out of Service :systemctl stop prometheus
2. docker Deploy
docker run \ -p 9090:9090 \ -v /path/to/prometheus.yml:/etc/prometheus/prometheus.yml \ prom/prometheus
边栏推荐
- Advanced programmers must know and master. This article explains in detail the principle of MySQL master-slave synchronization
- C. Three displays(动态规划)Codeforces Round #485 (Div. 2)
- Nature刊登量子计算重大进展:有史以来第一个量子集成电路实现
- 使用阿里云RDS for SQL Server性能洞察优化数据库负载-初识性能洞察
- How to open a futures account safely? Which futures companies are more reliable?
- How to select an open source license
- 炒期货在哪里开户最正规安全?怎么期货开户?
- 安装ImageMagick7.1库以及php的Imagick扩展
- PyTorch中的转置卷积详解
- B. Terry sequence (thinking + greed) codeforces round 665 (Div. 2)
猜你喜欢
![clang: warning: argument unused during compilation: ‘-no-pie‘ [-Wunused-command-line-argument]](/img/f0/42f394dbc989d381387c7b953d2a39.jpg)
clang: warning: argument unused during compilation: ‘-no-pie‘ [-Wunused-command-line-argument]

Build go command line program tool chain

CAP:多重注意力机制,有趣的细粒度分类方案 | AAAI 2021

Cap: multiple attention mechanism, interesting fine-grained classification scheme | AAAI 2021

Siggraph 2022 | truly restore the hand muscles. This time, the digital human hands have bones, muscles and skin

Apple is no match for the longest selling mobile phone made in China, and has finally brought back the face of the domestic mobile phone

Implement Domain Driven Design - use ABP framework - domain logic & application logic

B. Ternary Sequence(思维+贪心)Codeforces Round #665 (Div. 2)
![[application recommendation] the hands-on experience and model selection suggestions of apifox & apipost in the recent fire](/img/dd/24df91a8a1cf1f1b9ac635abd6863a.png)
[application recommendation] the hands-on experience and model selection suggestions of apifox & apipost in the recent fire

60 个神级 VS Code 插件!!
随机推荐
Recommend several super practical data analysis tools
How to select an open source license
The penetration of 5g users of operators is far slower than that of 4G. The popularity of 5g still depends on China Radio and television
Summer Challenge harmonyos - to do list with date effect
2021-04-27: if the adjacent position of a character does not have the same character
微信公众号调试与Natapp环境搭建
[application recommendation] the hands-on experience and model selection suggestions of apifox & apipost in the recent fire
基于STM32的MD5校验
Inter thread communication of embedded development foundation
ThinkPHP 漏洞利用工具
对深度可分离卷积、分组卷积、扩张卷积、转置卷积(反卷积)的理解
MySQL日期时间戳转换
Logging is not as simple as you think
One article explains Jackson configuration information in detail
Detailed explanation of estab of Stata regression table output
Some experiences of K project: global template highlights
转置卷积学习笔记
存在安全隐患 部分冒险家混动版将召回
How to easily realize online karaoke room and sing "mountain sea" with Wang Xinling
Software test [high frequency] interview questions sorted out by staying up late (latest in 2022)