【问题标题】:Filter out everything except values of monotonic growth过滤除单调增长值以外的所有内容
【发布时间】:2022-12-11 05:03:59
【问题描述】:

假设我有千分尺计时器my.timer。我有 grafana 指标 max(my_timer_seconds_max) by (pod) 给出:

我需要一个仅显示至少增长 5 分钟的值并过滤掉其他所有值的指标:

【问题讨论】:

    标签: grafana monitoring health-monitoring micrometer


    【解决方案1】:

    您可以使用“where”子句过滤掉不符合条件的数据点。例如,如果您只想显示至少增长了 5 分钟的值,您可以使用如下查询:

    max(my_timer_seconds_max)
    where my_timer_seconds_max > (previous(my_timer_seconds_max, 5) * 1.05)
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-04-06
      • 2013-10-30
      • 1970-01-01
      • 2018-01-29
      • 1970-01-01
      • 2017-08-26
      • 1970-01-01
      • 2017-10-11
      相关资源
      最近更新 更多