【问题标题】:where can I find the list of systemd node exporter metrics?我在哪里可以找到 systemd 节点导出器指标的列表?
【发布时间】:2019-04-16 20:28:44
【问题描述】:

我四处搜索和搜索,找不到节点导出器公开的 systemd 指标列表?

【问题讨论】:

    标签: systemd prometheus prometheus-node-exporter


    【解决方案1】:

    node_systemd 指标列表:

    node_systemd_unit_state - Systemd unit
    node_systemd_unit_start_time_seconds - Start time of the unit since unix epoch in seconds
    node_systemd_system_running - Whether the system is operational (see 'systemctl is-system-running')
    node_systemd_units - Summary of systemd unit states
    node_systemd_service_restart_total - Service unit count of Restart triggers
    node_systemd_timer_last_trigger_seconds - Seconds since epoch of last trigger
    node_systemd_socket_accepted_connections_total - Total number of accepted socket connections
    node_systemd_socket_current_connections - Current number of socket connections
    node_systemd_socket_refused_connections_total - Total number of refused socket connections
    

    请记住,systemd 收集器默认情况下是禁用的。您可以在启动 node-exporter 时通过传递 --collector.systemd 来启用它。

    附:目前我无法访问 prometheus / node-exporter 实例,但通过快速浏览该收集器 here 的代码,我得到了上面的列表。

    如果您有权访问正在运行的节点导出器并且相关的收集器已启用,您可以通过转到 /metrics 上的任何端口节点导出器轻松找到所有指标。

    【讨论】:

      【解决方案2】:

      systemd 指标的集合是disabled by default。要启用它,您需要使用以下标志启动 NodeExporter:

      ./node_exporter --collector.systemd
      

      完成此操作后,systemd 指标将显示在节点导出器 /metrics url 中,前缀为 node_systemd

      【讨论】:

        猜你喜欢
        • 2022-01-14
        • 1970-01-01
        • 2020-05-17
        • 1970-01-01
        • 2013-07-25
        • 2011-03-31
        • 1970-01-01
        • 2018-05-05
        • 2019-12-16
        相关资源
        最近更新 更多