【问题标题】:Is there a way to use a Prometheus counter with a holt_winters function call?有没有办法使用带有 holt_winters 函数调用的 Prometheus 计数器?
【发布时间】:2017-01-24 05:34:36
【问题描述】:

在 Prometheus 文档中,它描述了可用于生成平滑曲线的 holt_winters() 函数。

但是文档声明它只能与 Gauges 一起使用。 (显然我可以将它与计数器一起使用,然后我会得到一条一直在上升的平滑线,并不是非常有用)

我想利用holt_winters() 函数对抗http_request_total 之类的计数器。

类似的东西;

holt_winters(rate(http_request_total[5m])) by (path)

这可能吗?还是有更好的方法来解决这个问题?

【问题讨论】:

    标签: prometheus


    【解决方案1】:

    您需要使用记录规则来存储速率结果,请参阅https://www.robustperception.io/composing-range-vector-functions-in-promql/

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-01-03
      相关资源
      最近更新 更多