Skip to main content

Node exporter

Installation of node exporter

Download the package from the github repository

Then try to get the metrics with a curl command: curl http://localhost:9100/metrics

Create a systemctl task

First create a nonlogin user to run the task

sudo useradd -rs /bin/false node_exporter

Create a systemctl file

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

Past the following in it

[Unit]
Description=Node Exporter
After=network.target

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

[Install]
WantedBy=multi-user.target

Then restart the systemctl daemon, start the task and enable it at system start up

sudo systemctl daemon-reload
sudo systemctl start node_exporter
sudo systemctl enable node_exporter
sudo systemctl status node_exporter