Last active
January 22, 2018 17:23
-
-
Save broilogabriel/0e317752c7912e490c04c93cba45e2af to your computer and use it in GitHub Desktop.
This file contains hidden or 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/sh | |
# Execute with: | |
# wget -O - https://gist.githubusercontent.com/broilogabriel/0e317752c7912e490c04c93cba45e2af/raw/node_exporter.sh | sh | |
sudo apt-mark hold node-exporter && \ | |
wget https://github.com/prometheus/node_exporter/releases/download/v0.15.2/node_exporter-0.15.2.linux-amd64.tar.gz -P /tmp/ && \ | |
tar -zxvf /tmp/node_exporter-0.15.2.linux-amd64.tar.gz --wildcards -C /tmp/ node_exporter-*/node_exporter --strip-components=1 && \ | |
sudo cp /usr/sbin/node_exporter /usr/sbin/node_exporter.bkp && \ | |
sudo chmod -x /usr/sbin/node_exporter.bkp && \ | |
sudo kill -9 $(pgrep -f node_exporter) && \ | |
sudo service node-exporter stop && \ | |
sudo cp /tmp/node_exporter /usr/sbin/node_exporter && \ | |
sudo service node-exporter start && \ | |
sudo service node-exporter status |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment