通过 Kafka 报告(普罗米修斯)指标 [英] Report (prometheus) metrics via Kafka

查看:135
本文介绍了通过 Kafka 报告(普罗米修斯)指标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一种将 Prometheus 与应用程序分离的方法,通过在两者之间放置一个 Kafka 来实现这样的目标:

I am looking for a way to decouple Prometheus from applications by putting a Kafka in between to achieve something like this:

+-------------+             +----------+       +--------------+
| Application +--metrics--->+  Kafka   +------>+ Prometheus   |
+-------------+             +----------+       +--------------+

为了解决这个问题,我有两个问题:

In order to solve this problem I have two questions:

  • 是否有任何 Java 库可以抽象指标表示,以便我的应用不会以任何方式依赖 Prometheus?
  • 有可靠的 Kafka 记者吗?

欢迎提出任何意见或建议.

Any comments or suggestions are welcome.

推荐答案

Prometheus Java 客户端库的设计使您可以将其与其他监控系统一起使用,事实上,许多开源和商业监控系统都是按照 Prometheus 文本进行的格式正在成为事实上的标准.

The Prometheus Java client library is designed so that you can used it with other monitoring systems, and indeed many open source and commercial monitoring systems do so as the Prometheus text format is becoming a defacto-standard.

Prometheus 是一个基于拉的系统,完全不建议尝试将其转换为推送,因为您无缘无故地使您的生活变得更加艰难.建议让 Prometheus 直接抓取应用.

Prometheus is a pull based system and it is not at all recommended to try and convert it to push, you're making your life harder for no real reason. It is recommended to have Prometheus scrape the application directly.

这篇关于通过 Kafka 报告(普罗米修斯)指标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆