【问题标题】:Multiple Prometheus Instances with Single Prometheus-Operator具有单个 Prometheus-Operator 的多个 Prometheus 实例
【发布时间】:2021-03-16 14:39:41
【问题描述】:

我们正在寻求实施一种监控和警报解决方案,我们希望为其中的每个功能单元提供自己的 prometheus 实例。

目前我们通过 prometheus-operator 使用单个 prometheus 实例运行它,但现在我们需要使用单个 operator 将其扩展到多个 prometheus 实例。

有人可以为我提供正确的方向吗?

【问题讨论】:

    标签: prometheus prometheus-operator


    【解决方案1】:

    这非常简单:只需将多个 Prometheus 对象部署到具有不同配置的集群即可。 prometheus-operator 将管理任意数量的 prometheus 实例。

    在评论澄清后添加:

    prometheus-operator 是在您的集群中运行的一个软件,它使用 kind: Prometheus(和其他一些)查找新的/更改的/删除的对象,并根据 Prometheus 实体配置创建“常规”k8s 对象。

    您绝对可以安装多个 prometheus-operator chart 实例(我假设您的意思是名为 promethues-operator 现在重命名为 https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack 的图表)

    在任何时候都应该只有一个 prometheus-operator 实例(软件,而不是图表)在运行,因此只需确保任何其他版本不要安装 prometheus-operator 本身(软件,而不是图表)。它可以作为值参数传递给 helm:

    prometheusOperator:
      enabled: false
    

    【讨论】:

    • 我不明白普罗米修斯对象的事情。我是用helm chart来部署prometheus-operator,你的意思是添加prometheus的多个section吗?
    【解决方案2】:

    我们在扩展 prometheus 基础架构时遇到了类似的问题。然而,prometheus 并不是为可扩展性而设计的。基本上,您创建一个 prometheus 实例并用它做所有事情。

    您可以做的是将 Cortex 部署在 prometheus 之上。它的水平可扩展存储。

    然后你可以在 cortex 中添加配置来抓取指标。 (类似于你现在正在做的任何事情)https://github.com/cortexproject/cortex

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-07-09
      • 2020-10-08
      • 2021-08-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多