node_exporter 自定义收集指标 textfile

node_exporter 自定义收集指标 textfile

指定textfile收集器读取指标文件的目录路径

systemctl status node_exporter.service

cat /lib/systemd/system/node_exporter.service

[Unit]
Description=node_exporter service

[Service]
User=root
ExecStart=/root/node_exporter/node_exporter \
	--collector.textfile.directory=/seal/node_textfile

TimeoutStopSec=10
Restart=on-failure
RestartSec=5

[Install]
WantedBy=multi-user.target

systemctl daemon-reload
systemctl restart node_exporter.service
systemctl status node_exporter.service
curl http://localhost:9100/metrics

猜你喜欢

转载自blog.csdn.net/u010953692/article/details/130932231