【问题标题】:how to avoid multi prometheus instances remote write如何避免多个 prometheus 实例远程写入
【发布时间】:2019-01-23 12:18:25
【问题描述】:

我想在生产环境中设置 prometheus ha。

【问题讨论】:

    标签: kubernetes prometheus


    【解决方案1】:

    为长期存储构建这种类型的结构。解决方案是您可以将样本从 prometheus 发送到其他集群存储系统。偏僻的 当样本被摄取到另一个系统时,write 会发送它们。远程读取允许 PromQL 透明地使用来自另一个系统的样本,就像它被存储一样 在普罗米修斯本地。 为此,您可以编辑您的 prometheus.yml 并编写这些规则。

    remote_write:
        - url: http://localhost:1234/write
    remote_read:
        - url: http://localhost:1234/read
    

    您必须为服务启用 write_relabel_configs 标志。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-01-05
      • 1970-01-01
      • 1970-01-01
      • 2015-11-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多