当前位置:网站首页>Introduction to victoriametrics
Introduction to victoriametrics
2022-07-02 21:45:00 【Zhang quandan, Foxconn quality inspector】
VictoriaMetrics(VM) It supports high availability 、 Cost effective and scalable monitoring solutions and time series databases , Can be used for Prometheus Long term remote storage of monitoring data .
In the previous chapter, we introduced Thanos Solutions can also be used to solve Prometheus The problem of high availability and remote storage , So why do we use it VictoriaMetrics Well ? be relative to Thanos,VictoriaMetrics It is mainly a horizontally expandable Local full persistent storage scheme ( Performance ratio thanos Better performance ,thanos Not local full , Many of its historical data are stored in object storage , If you want to query historical data, you should pull it from the object storage , This is definitely slower than getting data locally ),VictoriaMetrics Not just time series databases , Its advantages are mainly reflected in the following points .
- External support Prometheus dependent API, Can be used directly Grafana As Prometheus Data source use
- Index data ingestion and query have high performance and good scalability , Performance ratio InfluxDB and TimescaleDB Higher than 20 times
- When dealing with high cardinality time series , Memory is also optimized , Than InfluxDB Less 10x times , Than Prometheus、Thanos or Cortex Less 7 times
- High performance data compression , And TimescaleDB comparison , Up to 70 Times of data points are stored in limited storage space , And Prometheus、Thanos or Cortex comparison , Less storage space required 7 times
- It is aimed at high latency IO And low IOPS Optimized storage for
- Provide a global query view , Multiple Prometheus Instance or any other data source may ingest data into VictoriaMetrics
It's easy to operate
VictoriaMetrics It consists of a small executable file without external dependencies
- All configurations are completed through clear command line flags and reasonable default values
- All data is stored in - storageDataPath In the directory pointed to by the command line parameter
have access to
vmbackup/vmrestoreTools can easily and quickly backup from real-time snapshots to S3 or GCS Object storeSupport obtaining data sources from third-party time series databases
- Due to the storage architecture , It can protect the storage from abnormal shutdown ( namely OOM、 Hardware reset or kill -9) Free from data corruption
- Also supporting indicators relabel operation
framework
VM It is divided into two schemes: single node and cluster , Select according to business requirements . The single node version directly runs a binary file , Officials suggest collecting data points (data points) lower than 100w/s, recommend VM Single node version , Simple and easy to maintain , But it does not support alarms . The cluster version supports data horizontal splitting . The picture below is VictoriaMetrics The official architecture diagram of the cluster version .
Here is the client , such as grafana, It queries our data through load balancing ,vmselect Is a stateless , If there is pressure, you can expand at will , It gets data from storage , And then go back .
vmstorge It's stateful , It is the only stateful component in the whole cluster , All time series data are stored in this vmstorge Inside .
vminsert It is also a stateless , So you can also expand horizontally , It inserts data into vmstorge Inside , Can pass Prometheus The remote write interface writes data to vminsert.
So it is divided into two ends , One end is vminsert Writing data , One end is vmselect Look up the data .
The source of writing data is from Prometheus, Other databases are also supported .

It mainly includes the following components :
vmstorage: Data storage and query result return , The default port is 8482vminsert: Data entry , Similar fragmentation can be achieved 、 Copy function , Default port 8480( You can insert data slices into multiple storage Among the examples, go to , There is a set of algorithm for how to insert )vmselect: Data query , Summary and data De duplication , Default port 8481vmagent: Data index capture , Support for a variety of back-end storage , It will occupy the local disk cache , Default port 8429vmalert: Alarm related components , No, if you don't need the alarm function, you can not use this component , The default port is 8880
The cluster scheme divides the functions into vmstorage、 vminsert、vmselect Components , If you want to replace Prometheus, You also need to use vmagent、vmalert( If you don't want to use it at all Prometheus, Then you can use vmagent,
). As can be seen from the figure above vminsert as well as vmselect( almost ) It's all stateless , So the extension is very simple , Only vmstorage It's stateful .
vmagent characteristic
vmagent Compared with Prometheus It has more flexibility in capturing indicators , For example, in addition to pulling (pull) Indicators can also be pushed (push) indicators , There are many other features :
- Can replace prometheus Of scraping target
- Support from the Kafka Read and write data
- Support based on prometheus relabeling Mode add 、 remove 、 modify labels, You can filter data before sending it to remote storage
- Support multiple data protocols ,influx line agreement ,graphite Text protocol ,opentsdb agreement ,prometheus remote write agreement ,json lines agreement ,csv Data etc.
- Support data collection at the same time , And replicate to a variety of remote storage systems
- Support unreliable remote storage , If remote storage is not available , The indicators collected will be in
-remoteWrite.tmpDataPathbuffer , Once the connection to remote storage is repaired , Buffered indicators will be sent to remote storage , The maximum disk usage of the buffer can be-remoteWrite.maxDiskUsagePerURLTo limit . - comparison prometheus Use less memory 、cpu、 disk io And network bandwidth
- When you need to grab a large number of targets , The capture target can be dispersed to multiple vmagent In the example
- High cardinality and high churn rates can be addressed by limiting the number of unique time series before grabbing time and sending it to remote storage systems
- You can load from multiple files scrape To configure

Supported functions and Prometheus almost , Can read Prometheus Configuration of , Also support rebleing, Support adding global labels , Persistent data to data disk .
It also supports protocols written remotely , writes vm among .
Outside, we can take the initiative to capture our indicators .
If you are building your monitoring system from scratch , In fact, you can not use it from the beginning Prometheus, You can use it directly vm, But the alarm function is a little weak . If vmalter Finish this , No at all Prometheus What's the matter , Because in memory and storage , It is better than Prometheus.
边栏推荐
- 【剑指 Offer 】56 - II. 数组中数字出现的次数 II
- It is said that this year gold three silver four has become gold one silver two..
- Redis分布式锁故障,我忍不住想爆粗...
- [shutter] shutter gesture interaction (click event handling | click OnTap | double click | long press | click Cancel | press ontapdown | lift ontapup)
- VIM command-t plugin error: unable to load the C extension - VIM command-t plugin error: could not load the C extension
- CVPR论文解读 | 弱监督的高保真服饰模特生成
- Gbase8s database type
- Basic knowledge of tree and binary tree (detailed illustration)
- GEE:(二)对影像进行重采样
- SQL必需掌握的100个重要知识点:管理事务处理
猜你喜欢

Image segmentation using pixellib

Spend more time with your computer on this special holiday, HHH

Find objects you can't see! Nankai & Wuhan University & eth proposed sinet for camouflage target detection, and the code has been open source

Technical solution of vision and manipulator calibration system

Huawei Hongmeng watch achieves fireworks display effect on New Year's Eve

A specially designed loss is used to deal with data sets with unbalanced categories

Unexpectedly, there are such sand sculpture code comments! I laughed

How does esrally perform simple custom performance tests?

MySQL learning notes (Advanced)

Report on investment development and strategic recommendations of China's vibration isolator market, 2022-2027
随机推荐
2019 Nanchang (relive the classic)
Analysis of neural network
Research Report on plastic antioxidant industry - market status analysis and development prospect forecast
Codeworks global round 19 (CF 1637) a ~ e problem solution
Find objects you can't see! Nankai & Wuhan University & eth proposed sinet for camouflage target detection, and the code has been open source
Basic IO interface technology - microcomputer Chapter 7 Notes
[shutter] shutter layout component (wrap component | expanded component)
MySQL inserts Chinese data and reports an error. Set the default collation
Five message formats of OSPF
Construction and maintenance of business websites [7]
D4:非成对图像去雾,基于密度与深度分解的自增强方法(CVPR 2022)
Centos7 installation and configuration of redis database
Analysis of enterprise financial statements [2]
Research Report on market supply and demand and strategy of China's Plastic Geogrid industry
*C language final course design * -- address book management system (complete project + source code + detailed notes)
China plastic bottle and container market trend report, technological innovation and market forecast
MySQL learning record (7)
In depth research and investment feasibility report of global and Chinese isolator industry, 2022-2028
Research Report on micro vacuum pump industry - market status analysis and development prospect prediction
MySQL learning notes (Advanced)