monitoring - Prometheus:根据另一个指标过滤查询

标签 monitoring prometheus grafana

假设我在 prometheus 中有两个指标,都是计数器:

  • requests_processed_total
  • requests_failed_total

它们都有匹配的 service 标签。示例:

requests_processed_total{service="news"} 1097
requests_processed_total{service="store"} 487
requests_failed_total{service="news"} 23
requests_failed_total{service="store"} 89

如何查询requests_failed_total,但仅限于request_processed_total > 1000的服务。

我期待以下响应:

requests_failed_total{service="news"} 23

# Note that the "store" service is excluded

最佳答案

关于monitoring - Prometheus:根据另一个指标过滤查询,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63134892/

相关文章:

go - goroutine不会将内存返回操作系统

metrics - Grafana 中的多时间序列操作

postgresql - 从 grafana 连接到 postgresql

database - 从 Postgres 统计信息收集器获取信息

node.js - 如何通过 NodeJS 获取 Tomcat 本地服务器的内存和 CPU 使用率

grafana - 如何使用 Prometheus 和collectd 导出器绘制grafana 中的CPU 使用情况图?

grafana - 普罗米修斯查询以计算唯一标签值

linux - 使用monit重启ffmpeg进程

spring - Spring项目中如何添加 Sentry 监控

kubernetes - 无法添加 K8s 服务作为 prometheus 目标