3.04 Install node_exporter - MartinWong06/grafana GitHub Wiki

What is node exporter?

Node exporter is a Prometheus exporter that collects and exposes various system-level metrics and statistics from a target machine, such as CPU usage, memory usage, disk I/O, network traffic, and more.

How we can use node exporter?

The node exporter is typically installed on the machine that you want to monitor, and it runs as a service that collects and exposes the system metrics via HTTP requests. The metrics are exposed in a format that can be read and scraped by the Prometheus server, which stores and processes the collected data in a time-series database.

List of exporter

Install Node Exporter

Ubuntu

sudo snap install node-exporter --beta

Test the Node Exporter service

curl http://localhost:9100/metrics

Other Linux Distro

  1. Download Node Exporter

    wget https://github.com/prometheus/node_exporter/releases/download/v1.5.0/node_exporter-1.5.0.linux-amd64.tar.gz
  2. Extract Node Exporter and move binary

    tar xvf node_exporter-1.5.0.linux-amd64.tar.gz

    You only need to move the binary file node_exporter to the /usr/local/bin directory of your system.

    sudo cp node_exporter-1.5.0.linux-amd64/node_exporter /usr/local/bin

    Remove the extracted directory

    rm -rf node_exporter-1.5.0.linux-amd64
  3. Create Node Exporter User

    As a good practice, create an user in the system for Node Exporter:

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

    And set the owner of the binary node_exporter to the recently created user:

    sudo chown node_exporter:node_exporter /usr/local/bin/node_exporter
  4. Create and start the Node Exporter service

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

    node_exporter.service

    image

    Close vi and save the changes to the file. Proceed to reload the daemon with:

    sudo systemctl daemon-reload

    And finally start the node_exporter service with the following command:

    sudo systemctl start node_exporter
  5. Test the Node Exporter service

    As last step, access your server through the web browser at port 9100 and browse the metrics (http://your_server_ip:9100/metrics). You should get an output in the browser similar to:

    curl http://localhost:9100/metrics

⚠️ **GitHub.com Fallback** ⚠️