Installing & configuring Node Exporter

Download and install Node Exporter

Download the latest version of Node Exporter and run the checksum verification process to ensure that the downloaded file has not been tampered with.

cd
curl -LO https://github.com/prometheus/node_exporter/releases/download/v1.8.2/node_exporter-1.8.2.linux-amd64.tar.gz
echo "6809dd0b3ec45fd6e992c19071d6b5253aed3ead7bf0686885a51d85c6643c66 node_exporter-1.8.2.linux-amd64.tar.gz" | sha256sum --check

Each downloadable file comes with it's own checksum. Replace the actual checksum and URL of the download link in the code block above.

Make sure to choose the amd64 version. Right click on the linked text and select "copy link address" to get the URL of the download link to curl.

Expected output: Verify output of the checksum verification

node_exporter-1.8.2.linux-amd64.tar.gz: OK

If checksum is verified, extract the files and move them into the (/usr/local/bin) directory for neatness and best practice. Then, clean up the duplicated copies.

tar xvf node_exporter-1.8.2.linux-amd64.tar.gz
sudo cp node_exporter-1.8.2.linux-amd64/node_exporter /usr/local/bin
rm -r node_exporter-1.8.2.linux-amd64 node_exporter-1.8.1.linux-amd64.tar.gz

Configure the Node Exporter service

Create an account (node_exporter) without server access for Node Exporter to run as a background service. This restricts potential attackers to only the Node Exporter service in the unlikely event that they manage to infiltrate via a compromised client update.

sudo useradd --no-create-home --shell /bin/false node_exporter

Create a systemd configuration file for the Node Exporter service to run in the background.

sudo nano /etc/systemd/system/node_exporter.service

Paste the configuration parameters below into the file:

[Unit]
Description=Node Exporter
Wants=network-online.target
After=network-online.target
[Service]
User=node_exporter
Group=node_exporter
Type=simple
Restart=always
RestartSec=5
ExecStart=/usr/local/bin/node_exporter
[Install]
WantedBy=multi-user.target

Once you're done, save with Ctrl+O and Enter, then exit with Ctrl+X.

Start the Node Exporter service

Reload systemd to register the changes made, start the Node Exporter service, and check its status to make sure its running.

sudo systemctl daemon-reload
sudo systemctl start node_exporter.service
sudo systemctl status node_exporter.service

Expected output: The output should say Node Exporter is “active (running)”. Press CTRL-C to exit and Node Exporter will continue to run.

Use the following command to check the logs of Teku Beacon Node’s syncing process. Watch out for any warnings or errors.

sudo journalctl -fu node_exporter -o cat | ccze -A

Expected output:

Press Ctrl+C to exit monitoring.

If the Node Exporter service is running smoothly, we can now enable it to fire up automatically when rebooting the system.

sudo systemctl enable node_exporter.service

Last updated