Skip to content

Instantly share code, notes, and snippets.

@serverok
Created November 18, 2019 09:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save serverok/aa37a0918143039f341c210979561aa4 to your computer and use it in GitHub Desktop.
Save serverok/aa37a0918143039f341c210979561aa4 to your computer and use it in GitHub Desktop.
#!/bin/bash
useradd --no-create-home --system --shell /bin/false node_exporter
cd /usr/local/src
wget https://github.com/prometheus/node_exporter/releases/download/v0.18.1/node_exporter-0.18.1.linux-amd64.tar.gz
tar xvf node_exporter-0.18.1.linux-amd64.tar.gz
cd /usr/local/src/node_exporter-0.18.1.linux-amd64/
mv node_exporter /usr/local/bin/
wget https://gist.github.com/serverok/7a2cbb6663e2ab11c7a8626adef5e9e5/raw -O /etc/systemd/system/node_exporter.service
systemctl enable node_exporter
systemctl start node_exporter
systemctl status node_exporter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment