当前位置:网站首页>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})边栏推荐
- The first character of leetcode sword offer that only appears once (12)
- 什么是embedding(把物体编码为一个低维稠密向量),pytorch中nn.Embedding原理及使用
- Yolov5进阶之九 目标追踪实例1
- 406. 根据身高重建队列
- Using notepad++ to build an arbitrary language development environment
- [set theory] inclusion exclusion principle (complex example)
- 链表有环,快慢指针走3步可以吗
- [transform] [NLP] first proposed transformer. The 2017 paper "attention is all you need" by Google brain team
- Yolov5进阶之七目标追踪最新环境搭建(二)
- Awvs batch operation script
猜你喜欢

创业团队如何落地敏捷测试,提升质量效能?丨声网开发者创业讲堂 Vol.03

Byte practice plane longitude 2

【注意力机制】【首篇ViT】DETR,End-to-End Object Detection with Transformers网络的主要组成是CNN和Transformer

There are links in the linked list. Can you walk three steps faster or slower
![[ue4] material and shader permutation](/img/8f/7743ac378490fcd7b9ecc5b4c2ef2a.jpg)
[ue4] material and shader permutation

QT program font becomes larger on computers with different resolutions, overflowing controls
![[Yu Yue education] scientific computing and MATLAB language reference materials of Central South University](/img/83/922efb4f88843f1b7feaccf2b515b9.jpg)
[Yu Yue education] scientific computing and MATLAB language reference materials of Central South University
![[graphics] efficient target deformation animation based on OpenGL es 3.0](/img/53/852ac569c930bc419846ac209c8d47.jpg)
[graphics] efficient target deformation animation based on OpenGL es 3.0

第04章_逻辑架构

Zero copy underlying analysis
随机推荐
Use of Tex editor
[engine development] rendering architecture and advanced graphics programming
Global and Chinese market of air cargo logistics 2022-2028: Research Report on technology, participants, trends, market size and share
零拷贝底层剖析
Global and Chinese markets for ionization equipment 2022-2028: Research Report on technology, participants, trends, market size and share
socket.io搭建分布式Web推送服务器
Byte practice surface longitude
解决pushgateway数据多次推送会覆盖的问题
Fundamentals of PHP deserialization
Global and Chinese markets for infrared solutions (for industrial, civil, national defense and security applications) 2022-2028: Research Report on technology, participants, trends, market size and sh
How does vs+qt set the software version copyright, obtain the software version and display the version number?
. Net six design principles personal vernacular understanding, please correct if there is any error
Global and Chinese market of Bus HVAC systems 2022-2028: Research Report on technology, participants, trends, market size and share
Open under vs2019 UI file QT designer flash back problem
Puppet自动化运维排错案例
The method of parameter estimation of user-defined function in MATLAB
Série yolov5 (i) - - netron, un outil de visualisation de réseau
远程服务器后台挂起 nohup
TPS61170QDRVRQ1
XWiki安装使用技巧