【问题标题】:How to make Prometheus check all the ports of a Docker container running on Marathon?如何让 Prometheus 检查 Marathon 上运行的 Docker 容器的所有端口?
【发布时间】:2017-02-20 22:18:47
【问题描述】:

我有一个 Docker 容器,暴露了两个以上的端口,在 Marathon 上运行。我在 Prometheus 配置文件中使用 Marathon SD 配置来识别目标,如下所示:

marathon_sd_configs:
- servers:
  - 'http://A.B.X.Y:Z'#Marathon URL

但是,Prometheus 似乎总是只检查一个暴露的端口(Marathon 应用程序定义中的第一个端口号)作为目标,并显示该目标的状态为“Down”,尽管我在其他暴露的一个端口上有可用的指标(通过在 Prometheus 中使用“static_config”进行验证)。如何让 Prometheus 也检查其他端口并识别实际目标端口?

【问题讨论】:

    标签: prometheus


    【解决方案1】:

    Prometheus 社区已解决此问题。

    问题链接:https://github.com/prometheus/prometheus/issues/2448

    合并拉取请求以将 Marathon 任务的所有端口视为目标:https://github.com/prometheus/prometheus/pull/2506

    【讨论】:

      猜你喜欢
      • 2023-04-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-12-27
      • 1970-01-01
      相关资源
      最近更新 更多