Last active
February 10, 2020 09:52
-
-
Save eloylp/7bd966d2b9895770dd0d47c199009b7f to your computer and use it in GitHub Desktop.
Node exporter setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
cat << EOF > /etc/systemd/system/node_exporter.service | |
[Unit] | |
After=network.target | |
[Service] | |
ExecStart=/usr/local/bin/node_exporter | |
[Install] | |
WantedBy=multi-user.target | |
EOF | |
apt-get update && apt-get install -y wget | |
cd /tmp | |
wget https://github.com/prometheus/node_exporter/releases/download/v0.18.1/node_exporter-0.18.1.linux-amd64.tar.gz | |
tar -xvzf node_exporter-0.18.1.linux-amd64.tar.gz | |
cd node_exporter-0.18.1.linux-amd64 | |
chown root.root node_exporter | |
mv node_exporter /usr/local/bin/ | |
chmod 655 /usr/local/bin/node_exporter | |
systemctl start node_exporter.service | |
systemctl enable node_exporter.service | |
systemctl status node_exporter.service |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment