1. 安装下载相关程序并启动
1.
curl -fsS --max-time 5 -o /tmp/install_edr.sh http://资源服务器ip/install_edr.sh && bash /tmp/install_edr.sh || curl -fsS --max-time 5 -o /tmp/install_edr.sh http://资源服务器ip/install_edr.sh && bash /tmp/install_edr.sh
2.
curl -fsS --max-time 5 -o /tmp/install_node_exporter.sh http://资源服务器ip/node_exporter/install_node_exporter.sh && bash /tmp/install_node_exporter.sh || curl -fsS --max-time 5 -o /tmp/install_node_exporter.sh http://资源服务器ip/node_exporter/install_node_exporter.sh && bash /tmp/install_node_exporter.sh
查询服务状态以及重启
ps aux | grep node_exporter
systemctl status node_exporter_9101.service
systemctl restartnode_exporter_9101.service
2. 如果启动报错
2.1 查看日志文件
journalctl -u node_exporter_9101.service
2.2 检查配置文件是否正确或者调整占用端口
cat /etc/systemd/system/node_exporter_9101.service
最后完成
