Skip to content

Instantly share code, notes, and snippets.

View rysyd's full-sized avatar
🍒
nothing.

Ryuan rysyd

🍒
nothing.
  • China
View GitHub Profile
@rysyd
rysyd / auto_node_exporter.sh
Last active July 13, 2024 10:05
auto_node_exporter.sh
#!/bin/bash
wget -P /tmp/ https://github.com/prometheus/node_exporter/releases/download/v1.8.1/node_exporter-1.8.1.linux-amd64.tar.gz
tar -xf /tmp/node_exporter-1.8.1.linux-amd64.tar.gz -C /tmp/
cp /tmp/node_exporter-1.8.1.linux-amd64/node_exporter /usr/bin/
groupadd -f node_exporter && useradd -g node_exporter --no-create-home --shell /bin/false node_exporter
chown node_exporter:node_exporter /usr/bin/node_exporter
cat > /usr/lib/systemd/system/node_exporter.service <<EOL
[Unit]