树莓派安装 node-exporter 备忘
2020-03-15 tech linux raspberry-pi 1 mins 606 字
源码安装
wget https://github.com/prometheus/node_exporter/releases/download/v0.14.0/node_exporter-0.14.0.linux-armv7.tar.gz
tar zxvf node_exporter-0.14.0.linux-armv7.tar.gz
mv node_exporter-0.14.0.linux-armv7/node_exporter /usr/local/bin
运行
直接运行
/usr/local/bin/node_exporter &
systemd 管理运行
vi /usr/lib/systemd/system/node_exporter.service
[Unit]
Description=node_exporter
After=network.target
[Service]
Type=simple
User=root
ExecStart=/usr/local/bin/node_exporter
Restart=on-failure
[Install]
WantedBy=multi-user.target
设定开机启动并启动:
systemctl enable node_exporter
systemctl start node_exporter
查看启动状态
systemctl status node_exporter