【问题标题】:Prometheus: How to create an SLI/SLO from blackbox exporter with probe_http_duration_seconds?Prometheus:如何使用 probe_http_duration_seconds 从黑盒导出器创建 SLI/SLO?
【发布时间】:2020-01-16 18:48:33
【问题描述】:

我尝试基于对 http 端点的延迟创建 SLI 几天以来没有成功。我有一个黑盒导出器和 3 天的数据。

我尝试了很多这样的事情:count_over_time(probe_http_duration_seconds{target_url="xxxx",phase="connect"}[7d] > 0.01) 我得到:二进制表达式必须只包含标量和即时向量类型” 我了解错误消息的内容,但真的不明白如何获取我想要的信息。

我的平均“probe_http_duration_seconds”请求大约为 10 毫秒,所以我想计算每次,黑盒在 10 毫秒内得到答案。假设超过 10 毫秒的请求是失败的。我需要衡量这些失败。

【问题讨论】:

    标签: prometheus promql prometheus-blackbox-exporter


    【解决方案1】:

    刚刚找到如何处理它:

    quantile_over_time(0.90,probe_http_duration_seconds{app="myapp",env="prd",instance="https://probe-target",job="blackbox",phase="connect"}[15d])
    

    非常适合使用黑盒导出器测量延迟 SLO

    【讨论】:

      猜你喜欢
      • 2021-02-12
      • 2021-07-09
      • 2020-05-19
      • 1970-01-01
      • 1970-01-01
      • 2021-05-06
      • 2023-02-15
      • 2021-07-02
      • 2023-01-28
      相关资源
      最近更新 更多