linuxone 部署nodeExport
1 上传exporter_instal.tgz文件
2 解压缩
3 执行部署脚本
4 echo 'cec_info{name="840A978"} 1' > /var/lib/node_exporter/textfile_collector/cec.prom
x86部署nodeExport
groupadd prometheus
useradd -g prometheus -m -d /usr/local/node_exporter/ -s /sbin/nologin prometheus_node
tar -zxf node_exporter-1.0.1.linux-amd64.tar.gz
mv node_exporter-1.0.1.linux-amd64 /usr/local/
ln -sv /usr/local/node_exporter-1.0.1.linux-amd64 /usr/local/node_exporter
touch /usr/lib/systemd/system/node_exporter.service
chown prometheus_node:prometheus /usr/lib/systemd/system/node_exporter.service
chown -R prometheus_node:prometheus /usr/local/node_exporter*
cat > /usr/lib/systemd/system/node_exporter.service <<EOF
[Unit]
Description=node_exporter
After=network.target
[Service]
Type=simple
User=prometheus_node
ExecStart=/usr/local/node_exporter/node_exporter
Restart=on-failure
[Install]
WantedBy=multi-user.target
EOF
mv /usr/local/node_exporter/node_exporter-1.0.1.linux-amd64 /usr/local/node_exporteraaa
rm -fr /usr/local/node_exporter
mv /usr/local/node_exporteraaa /usr/local/node_exporter
systemctl daemon-reload
systemctl enable node_exporter.service
systemctl start node_exporter.service
systemctl status node_exporter.service
systemctl restart node_exporter.service