在哪里可以找到 Prometheus 指标的描述?

zsl*_*lim 3 kubernetes prometheus promql

我正在 Grafana 中构建一个仪表板,使用来自 Prometheus 的数据来监控 Kubernetes 集群中的命名空间。我需要所有这些来查看负载测试期间会发生什么。

现在我花了半天时间寻找有关 Prometheus 中不同指标的信息。我已经阅读了Prometheus 文档kube 状态指标文档(从我们的集群中获取数据),但我没有找到关于哪个指标做什么的任何描述。我只能根据在这里和那里找到的查询结果和示例进行猜测,但这比我想要的更慢而且更不安全。

但是,我遇到了这个SO 答案,所以我认为引用一定是从某个地方复制的。请问有人吗?

zsl*_*lim 5

我找到了我的问题的答案。yogesh 的回答给了我看出口商的提示,我在这里找到了答案的另一半。

因此,在 Prometheus UI 上,有一个导出器列表及其抓取的端点(状态 > 目标)。如果我调用其中一个端点,响应将包含端点提供的每个指标的描述和类型。

称呼:

curl http://exporter.endpoint:9100/metrics
Run Code Online (Sandbox Code Playgroud)

来自回复的示例:

# HELP http_response_size_bytes The HTTP response sizes in bytes.
# TYPE http_response_size_bytes summary
http_response_size_bytes{handler="prometheus",quantile="0.5"} 16310
http_response_size_bytes{handler="prometheus",quantile="0.9"} 16326
http_response_size_bytes{handler="prometheus",quantile="0.99"} 16337
http_response_size_bytes_sum{handler="prometheus"} 1.46828673e+09
http_response_size_bytes_count{handler="prometheus"} 90835
# HELP node_arp_entries ARP entries by device
# TYPE node_arp_entries gauge
node_arp_entries{device="cali6b3dc03715a"} 1
node_arp_entries{device="eth0"} 15
Run Code Online (Sandbox Code Playgroud)

如何完成这项工作对我来说并非易事。我登录到集群,发现curl任何端点都没有得到任何响应。解决方案是将端点 url 的基础添加到no_proxy变量中(我的机器和服务器都位于公司代理后面)。

但无论如何,这就是人们如何阅读 Prometheus 指标的描述。