node_exporter安装教程
1、下载安装包
https://prometheus.io/download/
2、编写服务管理脚本
vim node_exporter.service
[Unit]
Description=node_exporter
Documentation=https://prometheus.io/
After=network.target
[Service]
Type=simple
User=root
ExecStart=/usr/local/node_exporter/node_exporter
Restart=on-failure
[Install]
WantedBy=multi-user.target
编写好后复制到 /lib/systemd/system/
3、启动服务
systemctl enable node_exporter # 开机自启
systemctl start node_exporter
4、访问服务页面
curl http://localhost:9100/metrics 即可看到node_exporter采集到是系统信息.