【问题标题】:Nested Query for PrometheusPrometheus 的嵌套查询
【发布时间】:2018-04-19 04:46:03
【问题描述】:

我想查询 Prometheus,如 如果我的集群指标超过了某个阈值,那么我想检查我的哪些主机超过了特定阈值,并最终根据该主机触发一个脚本。

【问题讨论】:

    标签: prometheus prometheus-alertmanager


    【解决方案1】:

    假设你有一个名为cluster的标签,那么你可以这样做:

    metric > 5 and on (cluster) avg by (cluster)(metric > 10)
    

    如果集群的指标平均值超过 10,它将返回超过 5 的每个实例。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-06-20
      • 2013-11-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多