从零开始的Linux运维屌丝之路,资源免费分享平台   运维人员首选:简单、易用、高效、安全、稳定、社区活跃的开源软件

安装node_exporter

发布:蔺要红08-29分类: 监控

[ -d /data/src ]|| mkdir -p /data/src
cd /data/src/
[ -f /data/src/node_exporter ]|| wget https://mirrors.linyaohong.com/src/node_exporter
chmod 777 node_exporter
/bin/cp  /data/src/node_exporter /usr/local/sbin/
cat >/etc/systemd/system/node_exporter.service <<EOF
[Unit]
Description=node_exporter
Documentation=https://prometheus.io/
After=network.target
[Service]
Type=simple
ExecStart=/usr/local/sbin/node_exporter
Restart=on-failure
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
systemctl enable node_exporter
systemctl restart node_exporter
温馨提示如有转载或引用以上内容之必要,敬请将本文链接作为出处标注,如有侵权我会在24小时之内删除!

欢迎使用手机扫描访问本站