【问题标题】:Where can I get node exporter metrics description?我在哪里可以获得节点导出器指标描述?
【发布时间】:2022-01-14 21:31:06
【问题描述】:

我是使用 prometheus、node exporter 等监控 k8s 集群的新手。

我想知道指标的确切含义,尽管指标的名称是自我描述的。

我已经查看了节点导出器的github,但没有得到有用的信息。

我在哪里可以获得节点导出器指标的描述?

谢谢

【问题讨论】:

    标签: linux kubernetes prometheus monitoring


    【解决方案1】:

    每个指标都有一个简短的描述。如果您在浏览器中打开节点导出器或只是 curl http://my-node-exporter:9100/metrics,您可以看到它们。您将看到所有导出的指标和带有# HELP 的行都是描述:

    # HELP node_cpu_seconds_total Seconds the cpus spent in each mode.
    # TYPE node_cpu_seconds_total counter
    node_cpu_seconds_total{cpu="0",mode="idle"} 2.59840376e+07
    

    Grafana 可以在编辑器中显示此帮助消息: Prometheus(带有最近的实验编辑器)也可以展示它: 这适用于所有指标,而不仅仅是节点导出器的。如果您需要有关这些值的更多技术细节,我建议您在 Google 和man 页面中搜索信息(如果您使用的是 Linux)。节点导出器几乎按原样从/proc 获取大部分指标,不难找到详细信息。以node_memory_KReclaimable_bytes 为例。 'Bytes' 后缀显然是单位,node_memory 只是一个命名空间前缀,KReclaimable 是实际的度量名称。使用man -K KReclaimable 将带您进入proc(5) 手册页,您可以在其中找到:

               KReclaimable %lu (since Linux 4.20)
                     Kernel allocations that the kernel will attempt to
                     reclaim under memory pressure.  Includes
                     SReclaimable (below), and other direct allocations
                     with a shrinker.
    

    最后,如果想要了解更多关于指标的意图是出于为您的硬件配置警报的愿望,您可以跳到最后一部分并从此处获取社区共享的一些警报:https://awesome-prometheus-alerts.grep.to/rules#host-and-hardware

    【讨论】:

    • 哇,我得到的信息比我预期的要多。谢谢
    猜你喜欢
    • 2019-04-16
    • 2019-12-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-01-07
    • 1970-01-01
    • 2011-02-24
    • 1970-01-01
    相关资源
    最近更新 更多