【问题标题】:How to measure HTTP Latency with Percentile in Prometheus如何在 Prometheus 中使用 Percentile 测量 HTTP 延迟
【发布时间】:2017-10-06 18:15:37
【问题描述】:

我正在尝试使用 prometheus 查询绘制 http 后端时间的百分位数图。但它返回 NaN。

给一些子查询工作,但即使一个值有 NaN,sum 也会返回 Nan。

sum by (quantile) (http_duration_milliseconds{http_status_code=~"[23]"})

【问题讨论】:

    标签: grafana prometheus


    【解决方案1】:

    如果最近没有查询,分位数将为 NaN,类似于 total time of queries/number of queries 将是 NaN。

    对分位数求和或对其执行任何其他聚合也是不正确的,因为这没有统计意义。如果您需要聚合分位数,请使用 Prometheus 直方图类型。

    【讨论】:

      猜你喜欢
      • 2018-04-28
      • 1970-01-01
      • 2023-03-14
      • 1970-01-01
      • 2010-11-17
      • 2015-01-23
      • 1970-01-01
      • 2019-03-11
      • 2021-06-07
      相关资源
      最近更新 更多