Prometheus Node Exporter Introduction and Install as a Service

Video Lecture

Prometheus Node Exporter Introduction and Install as a Service Prometheus Node Exporter Introduction and Install as a Service Prometheus Node Exporter Introduction and Install as a Service

Check Available Version

1
sudo apt-cache policy prometheus-node-exporter

You should have the version 0.18 or above. If not, then you can download the version manually using the commands below, and then you will need to manually set it up as a service.

Download Prometheus Node Exporter Binary

1
wget https://github.com/prometheus/node_exporter/releases/download/v0.18.1/node_exporter-0.18.1.linux-amd64.tar.gz
1
tar xzf node_exporter-0.18.1.linux-amd64.tar.gz
1
cp node_exporter-0.18.1.linux-amd64/node_exporter /usr/local/bin/

Configure Prometheus Node Exporter as a Service

Now we will configure Prometheus Node Exporter as a Service so that we can keep it running in the background.

Create a file called node-exporter.service

1
sudo nano /etc/systemd/system/node-exporter.service

Add the script and save

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
[Unit]
Description=Prometheus Node Exporter Service
After=network.target

[Service]
Type=simple
ExecStart=/usr/local/bin/node_exporter

[Install]
WantedBy=multi-user.target

Now start and check the service is running.

1
2
3
systemctl daemon-reload
sudo service node-exporter start
sudo service node-exporter status

Prometheus Course

If you want to try a more detailed course on Prometheus, then you can visit my Prometheus tutorials.