[英]Prometheus Query - Group by values and return a count
我有一个指标,它为每个时间序列返回一些唯一值。 (这是来自 Prometheus Blackbox Exporter)。 请参阅下面的示例
如何按值对它们进行分组并返回计数。 以下是预期的结果
{status="400"} 1 {status="0"} 0 {status="200"} 2
使用以下 PromQL:
count_values("status", probe_http_status_code)
Prometheus 文档中的更多信息。
[英]Prometheus query to count unique label values
[英]Prometheus query to count unique label values over a period
[英]Prometheus count query for a particular period
[英]Prometheus query to return Top 5 results
[英]Interpolating missing Prometheus values in a query
[英]How can I group labels in a Prometheus query?
[英]how to exclude some job in count by prometheus query
[英]Group labels in a Prometheus query based on regex
[英]Count values per X minutes in Prometheus
[英]Prometheus count frequency distinct values of gauge
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.