当前位置:网站首页>【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
边栏推荐
- Some experiences of K project: global template highlights
- B. Terry sequence (thinking + greed) codeforces round 665 (Div. 2)
- ZOJ - 4104 sequence in the pocket
- [cloud native | kubernetes chapter] Introduction to kubernetes Foundation (III)
- Rush for IPO, Hello, I'm in a hurry
- D. Solve the maze (thinking +bfs) codeforces round 648 (Div. 2)
- 存在安全隐患 路虎召回部分混动揽运
- 2021-05-01: given an ordered array arr, it represents the points located on the X axis. Given a positive number k
- Convert text to hexadecimal, and reverse
- Fastjson vulnerability utilization techniques
猜你喜欢

Recommend several super practical data analysis tools

实现领域驱动设计 - 使用ABP框架 - 领域逻辑 & 应用逻辑

【面试高频题】难度 3/5,可直接构造的序列 DP 题

Solution to the problem that FreeRTOS does not execute new tasks

Understanding openstack network

打破内存墙的新利器成行业“热搜”!持久内存让打工人也能玩转海量数据+高维模型

How to expand disk space on AWS host
![Software test [high frequency] interview questions sorted out by staying up late (latest in 2022)](/img/33/2c2256fd98b908ddaf5573f644ad7f.png)
Software test [high frequency] interview questions sorted out by staying up late (latest in 2022)
![[C language questions -- leetcode 12 questions] take you off and fly into the garbage](/img/ca/a356a867f3b7ef2814080fb76b9bfb.png)
[C language questions -- leetcode 12 questions] take you off and fly into the garbage
![[interview high frequency questions] sequential DP questions with difficulty of 3/5 and direct construction](/img/32/720ffa63a90cd5d37460face3fde38.png)
[interview high frequency questions] sequential DP questions with difficulty of 3/5 and direct construction
随机推荐
Siggraph 2022 | truly restore the hand muscles. This time, the digital human hands have bones, muscles and skin
2021-04-27: if the adjacent position of a character does not have the same character
C. K-th not divisible by n (Mathematics + thinking) codeforces round 640 (Div. 4)
Inter thread communication of embedded development foundation
打破内存墙的新利器成行业“热搜”!持久内存让打工人也能玩转海量数据+高维模型
一文理解OpenStack网络
Nature刊登量子计算重大进展:有史以来第一个量子集成电路实现
MySQL InnoDB and MyISAM
Golang+redis reentrant lock
微信公众号调试与Natapp环境搭建
存在安全隐患 路虎召回部分混动揽运
Global and Chinese market for commercial barbecue smokers 2022-2028: Research Report on technology, participants, trends, market size and share
嵌入式开发基础之线程间通信
CAP:多重注意力机制,有趣的细粒度分类方案 | AAAI 2021
Global and Chinese markets of natural insect repellents 2022-2028: Research Report on technology, participants, trends, market size and share
How to select an open source license
Product level design of a project in SAP mm
I just came back from the Ali software test. I worked for Alibaba P7 in 3+1, with an annual salary of 28*15
Wechat official account debugging and natapp environment building
[C language questions -- leetcode 12 questions] take you off and fly into the garbage