【问题标题】:How can we get high availability in prometheus data store?我们如何在 prometheus 数据存储中获得高可用性?
【发布时间】:2018-04-23 06:03:37
【问题描述】:

我是 prometheus 的新手,所以我不确定高可用性是否是 Prometheus 数据存储 tsdb 的一部分。我没有考虑让两个普罗米修斯服务器实例从同一个导出器中抓取数据,因为这很有可能有两个不同步的 tsdb 数据存储。

【问题讨论】:

    标签: high-availability prometheus


    【解决方案1】:

    这真的取决于你的要求。

    您是否需要针对指标的高可用性警报? Prometheus can do that.

    您是否需要一个高度可用的监控系统,其中包含用于操作分类的最后几个小时的数据?两个 prometheus 实例也非常适合。

    您需要长期存储时间序列数据吗? Prometheus 并非旨在自行完成此任务。要么使用 prometheus 的 remote write 功能将数据传送到另一个支持冗余存储的 TSDB(InfluxDB 和 Clickhouse 在这里非常有前途),但您需要对数据进行重复数据删除。或者,考虑Cortex

    【讨论】:

    • CrateDB 是通过远程写入 Prometheus 进行长期存储的另一种选择。我已经写了guide 来介绍如何使用 Prometheus 进行设置。
    • 还有VictoriaMetrics,支持高可用、去重和复制。
    【解决方案2】:

    对于使用kube-prometheus(prometheus-operator)的 Kubernetes 设置,您可以使用值对其进行配置。

    包括thanos 在这种情况下会有所帮助

    【讨论】:

      【解决方案3】:

      prometheus-postgresql-adapter 允许您使用 PostgreSQL / TimescaleDB 作为远程存储。该适配器支持多个 Prometheus 实例(HA 设置)写入单个远程存储,因此您只有一个事实来源。最近,我发了一篇关于它的博文【如何使用 PostgreSQL + TimescaleDB 管理 Prometheus 高可用】(https://blog.timescale.com/prometheus-ha-postgresql-8de68d19b6f5)。

      免责声明:我是适配器背后的工程师之一

      【讨论】:

        猜你喜欢
        • 2019-02-28
        • 2018-09-23
        • 2016-12-02
        • 2017-04-28
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2020-09-17
        • 2013-06-19
        相关资源
        最近更新 更多