【问题标题】:Any recommendation about run Prometheus in docker container or not?关于在 docker 容器中运行 Prometheus 有什么建议吗?
【发布时间】:2017-08-01 08:36:21
【问题描述】:

我们的团队决定改用 Prometheus 监控。所以我想知道如何设置高可用性容错 Prometheus 安装。 我们有一堆小项目,运行在 AWS ECS 上,几乎所有的服务都是容器化的。所以我有一些问题。

我们应该将 Prometheus 容器化吗?

这意味着运行 2 个 EC2 实例,每个实例一个 Prometheus 容器,每个实例一个 NodeExporter。并在容器中运行高度可用的警报管理器,每个实例在单独的实例中使用 Wave Mesh。

或者只是在 EC2 上安装 Prometheus 二进制文件和其他东西而忘记将它们容器化?

有什么想法吗?高可用性 Prometheus 设置是否存在一些最佳实践?

【问题讨论】:

    标签: docker containers monitoring devops prometheus


    【解决方案1】:

    不要在容器内运行node_exporter,因为这样会大大限制公开的指标数量。

    还有一个与 Prometheus 设置相关的 HA guide,可能对您有用。

    这个问题也更适合Prometheus user mailing list

    【讨论】:

    • Don't run node_exporter inside of a container as you'll greatly limit the number of metrics exposed - 任何解释将不胜感激
    • @heartwilltell 节点导出器导出机器级指标。容器化节点导出器将其从运行它的主机系统中抽象出来,从而限制了您可用的数量指标。这在节点导出器github.com/prometheus/node_exporter#using-docker 的自述文件中得到了进一步解决。这个线程也可能有用github.com/prometheus/node_exporter/issues/474 希望有帮助!
    【解决方案2】:

    如果你配置了一些额外的选项,特别是对于 node_exporter,在容器中运行 Prometheus 就可以了。这种方法的挑战在于 node_exporter 从它所看到的本地机器(在本例中为容器)收集指标,而我们希望它从主机收集指标。 Prometheus 提供选项来覆盖从中收集数据的文件系统挂载点。

    请参阅https://www.digitalocean.com/community/tutorials/how-to-install-prometheus-using-docker-on-ubuntu-14-04 for detailed instructions. 中的“第 2 步”

    【讨论】:

      猜你喜欢
      • 2019-01-29
      • 2015-08-30
      • 2017-11-10
      • 2018-09-22
      • 2021-01-29
      • 2020-05-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多