5

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

4

2 回答 2

5

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 收集器默认情况下是禁用的。您可以--collector.systemd在启动 node-exporter 时通过传递来启用它。

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

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

于 2018-11-14T01:26:21.683 回答
2

默认情况下禁用systemd 指标的收集。要启用它,您需要使用以下标志启动 NodeExporter:

./node_exporter --collector.systemd

完成后,systemd 指标将显示在/metrics带有前缀的节点导出器 url 中node_systemd

于 2018-11-17T15:50:09.873 回答