Menu

Installing node-exporter quickly

node-exporter (also written as node_exporter) is a prometheus exporter for hardware and OS metrics on *NIX kernels. It allows operators to have introspection into the relative health of the fleet of machines and to build dashboards and automated actions.

While prometheus does provide pre-built binaries for a number of kernels and architectures, they are only distributed as tarballs.

In the spirit of consistency, we decided to script the installation procedure for node-exporter so that we can have a repeatable setup across all of our machines. This script can also be used to upgrade and downgrade node-exporter to any version available on prometheus' node-exporter repository.

For the time being, the script is available as a gist. Please send in improvements and bugfixes.

For one-off installs, you can pipe the script directly to a shell.

# Piping curl to a shell
curl -L 'https://gist.github.com/t0xicCode/515fb1c057db13796d5d6f9b2c03046c/raw/install-node-exporter.sh' | sudo sh

However, we recommend downloading the script to a local file, inspecting the script, then running the local copy.

curl -L 'https://gist.github.com/t0xicCode/515fb1c057db13796d5d6f9b2c03046c/raw/install-node-exporter.sh' -o install-node-exporter.sh
chmod +x install-node-exporter.sh
sudo ./install-node-exporter.sh