如何在 Prometheus 中使用标签(Labels)?

提问者:Rae 问题分类:面试刷题
如何在 Prometheus 中使用标签(Labels)?
1 个回答
回忆多美好
回忆多美好
标签是 Prometheus 用来区分同一时间序列不同维度的标识符。每个时间序列可以有多个标签,标签键值对可以帮助用户区分不同的资源和维度。例如,http_requests_total{status="200", method="GET"},其中 status 和 method 是标签键,分别表示 HTTP 状态和请求方法。标签使得 Prometheus 能够执行高效的维度查询。
发布于:4天前 IP属地:四川省
我来回答