当前位置:网站首页>Solve the problem that pushgateway data will be overwritten by multiple push
Solve the problem that pushgateway data will be overwritten by multiple push
2022-07-03 15:06:00 【Initial-T】
problem
Multiple client, To the same station pushgateway When pushing data , Use the same job name , You will find that there is only one left client The data of , Others will be covered
Using language python
analysis
I found out by grabbing , All data has been pushed to 9091 port , So the exclusion is some client Push questions
Code
push_to_gateway(pushgateway_url, job=job_name, registry=registry)
It is equivalent to pushing to metrics/job/job_name
Question why
Push indicators are managed by group , It is identified by the grouping key of any number of labels , Generally speaking, there are Job Follow instance, Only specify when pushing Job Words , Will miss a few server The pushed data is treated as the same group of data , Coverage occurs
Therefore, the unique identification of this batch of data should be added to the grouping identification , That is, the push link should specify the unique storage location for this batch of data , Similar to the concept of house number . Only job It's equivalent to pushing them to the same position .
solve
Pushed to the metrics/job/job_name/instance/id that will do
Here we can push to metrics/job/job_name/client/client_name
reference python Usage of Library
https://github.com/prometheus/client_python
Change to the following code to successfully push
push_to_gateway(pushgateway_url, job=job_name, registry=registry,grouping_key={"client":client_name})
边栏推荐
- Puppet自动化运维排错案例
- [pytorch learning notes] transforms
- Global and Chinese markets for sterile packaging 2022-2028: Research Report on technology, participants, trends, market size and share
- TPS61170QDRVRQ1
- 5-1 blocking / non blocking, synchronous / asynchronous
- [ue4] cascading shadow CSM
- [attention mechanism] [first vit] Detr, end to end object detection with transformers the main components of the network are CNN and transformer
- 【可能是全中文网最全】pushgateway入门笔记
- Global and Chinese market of optical fiber connectors 2022-2028: Research Report on technology, participants, trends, market size and share
- Global and Chinese markets for indoor HDTV antennas 2022-2028: Research Report on technology, participants, trends, market size and share
猜你喜欢
复合类型(自定义类型)
[ue4] cascading shadow CSM
Yolov5 series (I) -- network visualization tool netron
Unity hierarchical bounding box AABB tree
【Transform】【NLP】首次提出Transformer,Google Brain团队2017年论文《Attention is all you need》
[attention mechanism] [first vit] Detr, end to end object detection with transformers the main components of the network are CNN and transformer
零拷贝底层剖析
Centos7 deployment sentry redis (with architecture diagram, clear and easy to understand)
Byte practice surface longitude
[ue4] HISM large scale vegetation rendering solution
随机推荐
Solve the problem that PR cannot be installed on win10 system. Pr2021 version -premiere Pro 2021 official Chinese version installation tutorial
The latest M1 dedicated Au update Adobe audit CC 2021 Chinese direct installation version has solved the problems of M1 installation without flash back!
[opengl] pre bake using computational shaders
Tensor 省略号(三个点)切片
链表有环,快慢指针走3步可以吗
Besides lying flat, what else can a 27 year old do in life?
Relationship between truncated random distribution and original distribution
什么是Label encoding?one-hot encoding ,label encoding两种编码该如何区分和使用?
【可能是全中文网最全】pushgateway入门笔记
Functional modules and application scenarios covered by the productization of user portraits
XWiki安装使用技巧
Global and Chinese markets for ionization equipment 2022-2028: Research Report on technology, participants, trends, market size and share
[ue4] cascading shadow CSM
What is one hot encoding? In pytoch, there are two ways to turn label into one hot coding
There are links in the linked list. Can you walk three steps faster or slower
Leetcode the smallest number of the rotation array of the offer of the sword (11)
Piwigo 2.7.1 sqli learning
What is label encoding? How to distinguish and use one hot encoding and label encoding?
5-1 blocking / non blocking, synchronous / asynchronous
Leetcode sword offer find the number I (nine) in the sorted array