Apache 风暴指标报告程序未按预期工作

问题描述 投票:0回答:0

我正在使用 apache storm 2.4.0 版本,我们希望所有指标都需要公开。因此,我们创建了一个服务,它可以及时接受所有指标,并将指标暴露在 /metrics 端点上。 storm 使用 drop-wizard 指标,我通过上述过程将它们转换为 prometheus 指标。 在对 storm 2.4.0 版本的实际代码进行少量更改后,整个设置是在 kubernetes 上完成的。 关于 kubernetes 的设置,我有不同的 nimbus pod 和 supervisor pod 以及 zookeeper pod。这些都是连接的(不确定这两个是否应该在一个吊舱中)。

topology.metrics.reporters:
  # Prometheus Reporter
  - class: "com.example.storm.PrometheusStormReporter"
    daemons:
      - "supervisor"
      - "nimbus"
      - "worker"
    report.period: 60
    report.period.units: "SECONDS"

storm.metrics.reporters:
  # Prometheus Reporter
  - class: "com.example.PrometheusStormReporter"
    daemons:
        - "supervisor"
        - "nimbus"
        - "worker"
    report.period: 60
    report.period.units: "SECONDS"

上述记者将对我们的服务进行邮寄呼叫,其中所有指标均已填充。

我已将 drop-wizard 指标转换为 prometheus 指标并对我们的服务进行 POST 调用。 我已将时间从 60 秒减少到 5 秒和 10 秒。 但是风暴正在处理的内容与我们在 /metrics 端点上看到的内容之间存在很大差异。

我尝试的另一种方法是在螺栓的执行方法中想要时推送指标(与我当前的逻辑顺序)。这样,我就准确地添加了指标并相应地移动了它们。但这会增加处理时间(我不想要)。如果发布失败,我需要明确地使元组失败并为此添加风暴重试。

我需要切换到推送网关吗? 或者我可以获得完整指标的任何其他方式。

java apache-storm apache-storm-topology apache-storm-configs
© www.soinside.com 2019 - 2024. All rights reserved.