当前位置:网站首页>Prometheus PushGateway 碎碎念
Prometheus PushGateway 碎碎念
2022-06-24 12:49:00 【51CTO】
Prometheus 是一套开源的监控告警系统,PushGateway 是其中一个组件。这个组件用来收取推送来的数据并且供 Prometheus 来拉取。
在 Prometheus 的 设计理念中,指标最好被暴露在一个固定的接口中,并且定时更新就好。Prometheus 会定时去这个接口拉取数据到 Prometheus 的数据库中,开发团队认为这种模式对于监控来讲是最合适的,这种拉取模式有这么几个好处。
第一,从 Server 端可以精确的控制一次获取多少数据。
第二,当数据量增大以后,无论是通过水平分割也好,还是垂直分割也好,只调整服务端就好。
第三,客户端会比较省事,只需要做一个安安静静的美男子,做好自己的事情--暴露指标就好,不需要关心 Server 在哪里,也不需要关心指标是否推送成功。
所以完全在这种模式的情况下,Prometheus 还是很完美的,但是总有人会提出不一样的需求,基于不同的场景,总有人会想要推送数据到 Prometheus 。为了解决数据推送的问题,Prometheus 的开发团队开发了 PushGateway,可以先将数据推送到 PushGateway ,然后 Prometheus 再从 PushGateway 拉取数据,这样既不用修改 Prometheus 的设计思路,也可以兼容这种少量场景。
开发团队在文档中一再强调,这种只适用于少量数据的个别场景。但是既然开了这个口子,就总有人会放大这个场景。举个例子,针对大数据方面的 Flink 应用的监控,Flink 是兼容 Prometheus 的,并且提供了 2 种模式,一种是基于 Prometheus 的拉取模式,会暴露特定的端口供 Prometheus 来拉取;一种是推送的模式,推送到 PushGateway。在网络上查找 Flink 的监控方案,不知道其他技术团队是怎么处理的,网络上好多基于 Yarn 的管理模式都是推荐使用 推送到 PushGateway 的方式来进行监控。
但是这样就违背了 Prometheus 的设计理念,而且还会遇到 PushGateway 的大内存以及 TTL 清理问题,很多人在 PushGateway 的 Issue 里提让增加类似 TTL 的参数来解决这个问题,开发团队给出的答复是,在举例的众多场景中,都是违背 Prometheus 设计理念的场景,所以拒绝添加 类似 TTL 的功能。我倒是很理解 Prometheus 开发团队的想法,但是企业业务团队的需求也要解决。目前还在寻找解决方案中,找到了再和大家分享。
边栏推荐
- Sphere, openai and ai21 jointly publish the best practice guidelines for deployment models
- 实现领域驱动设计 - 使用ABP框架 - 更新操作实体
- 使用 Abp.Zero 搭建第三方登录模块(一):原理篇
- 物联网?快来看 Arduino 上云啦
- 如何高效的分析online.log
- LVGL库入门教程 - 颜色和图像
- Pycharm中使用Terminal激活conda服务(终极方法,铁定可以)
- Leetcode 1218. Longest definite difference subsequence
- 脚本之美│VBS 入门交互实战
- 几种常见的DoS攻击
猜你喜欢

我真傻,招了一堆只会“谷歌”的程序员!

Parti,谷歌的自回归文生图模型

系统测试主要步骤

物联网?快来看 Arduino 上云啦

hands-on-data-analysis 第三单元 模型搭建和评估

The data value reported by DTU cannot be filled into Tencent cloud database through Tencent cloud rule engine

DTU上报的数据值无法通过腾讯云规则引擎填入腾讯云数据库中

Who is the fish and who is the bait? Summary of honeypot recognition methods from the perspective of red team

CVPR 2022 | 美團技術團隊精選論文解讀

Internet of things? Come and see Arduino on the cloud
随机推荐
LVGL库入门教程 - 颜色和图像
Cohere、OpenAI、AI21联合发布部署模型的最佳实践准则
Integrate the authorization interface code of intra city distribution account of multiple express companies nationwide - Express 100
How can ffmpeg streaming to the server save video as a file through easydss video platform?
On the difference between process and thread
The 35 "top 100 counties" of tmall 618 agricultural products come from the central and western regions and Northeast China
Integrate API interface parameter Dictionary of accounts of multiple local distribution companies - Express 100
SCRM, a breakthrough in the new consumption era
[log service CLS] Tencent cloud log service CLS accesses CDN
Perhaps the greatest romance of programmers is to commemorate their dead mother with a software
一文讲透研发效能!您关心的问题都在
脚本之美│VBS 入门交互实战
What is SCRM? What is the difference between SCRM and CRM
Interviewer: the MySQL database is slow to query. What are the possible reasons besides the index problem?
‘高并发&高性能&高可用服务程序’编写及运维指南
Kubernetes集群部署
实现领域驱动设计 - 使用ABP框架 - 更新操作实体
Open source monitoring system Prometheus
Boss direct employment IPO: both the end and the beginning
问个sql view的问题