Run the following commands on each linux node to install Node Exporter as service.

Procedure

  1. Download and move the node exporter binary to /usr/local/bin (You can find the latest binaries from official github link for node_Exporter)
    wget https://github.com/prometheus/node_exporter/releases/download/v*/node_exporter-*.*-amd64.tar.gz
    tar xvfz node_exporter-*.*-amd64.tar.gz
    sudo mv node_exporter-*.*-amd64/node_exporter /usr/local/bin/
  2. Create a node_exporter user to run the node exporter service.
    sudo useradd -rs /bin/false node_exporter
  3. Create a node_exporter service file under systemd.
    sudo tee /etc/systemd/system/node_exporter.service<<EOF
    [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
    EOF
  4. Reload the system daemon and start the node exporter service.
    sudo systemctl daemon-reload
    sudo systemctl start node_exporter
    sudo systemctl enable node_exporter
  5. Check the status of node exporter if it is running in active state.
    sudo systemctl status node_exporter
    You can see all the server metrics or node metrics from the following link.
    http://<Node-IP>:9100/metrics
    .