asp*_*yct 2 monitoring grafana prometheus
假设我在普罗米修斯中有两个指标,都是计数器:
requests_processed_totalrequests_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
Run Code Online (Sandbox Code Playgroud)
如何查询requests_failed_total,但仅限于其服务request_processed_total > 1000。
我期待以下回复:
requests_failed_total{service="news"} 23
# Note that the "store" service is excluded
Run Code Online (Sandbox Code Playgroud)
requests_failed_total and on(service) requests_processed_total > 1000
https://prometheus.io/docs/prometheus/latest/querying/operators/#ological-set-binary-operators https://prometheus.io/docs/prometheus/latest/querying/operators/#one-to-one -向量匹配
| 归档时间: |
|
| 查看次数: |
9836 次 |
| 最近记录: |