Skip to content

This repository provides all the necessary information to set up the Node Exporter on a server and integrate it with Prometheus. You can upload it to GitHub for future reference or to share it with other team members.

License

Notifications You must be signed in to change notification settings

DavidOliveirax/config-node_exporter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Node Exporter Setup for Metrics Collection in Prometheus

This document describes how to install and configure the Node Exporter on a server so that metrics can be collected by Prometheus.

Step 1: Install Node Exporter

  1. Download the latest version of Node Exporter:

    wget https://github.com/prometheus/node_exporter/releases/download/v1.8.2/node_exporter-1.8.2.linux-amd64.tar.gz
    

    (can be found here: Node Exporter Download)

  2. Extract the downloaded file:

    tar xvfz node_exporter-1.8.2.linux-amd64.tar.gz
  3. Move it to a common directory:

    mv node_exporter-1.8.2.linux-amd64/node_exporter /usr/local/bin/

Step 2: Configure Node Exporter as a Service

  1. Create a service file for Node Exporter:

    nano /etc/systemd/system/node_exporter.service
  2. Add the configurations to the file:

    [Unit]
    Description=Node Exporter
    Wants=network-online.target
    After=network-online.target
    
    [Service]
    User=node_exporter
    ExecStart=/usr/local/bin/node_exporter
    
    [Install]
    WantedBy=default.target
  3. Create the user and adjust permissions:

    useradd -rs /bin/false node_exporter
  4. Start the service, enable it to start automatically, and check the status:

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

Step 3: Add the configuration on the Prometheus Server

  1. In the prometheus.yml file, add your job configuration in the scrape_configs section:

    - job_name: "node_exporter"
      static_configs:
        - targets: ["SERVER_IP:9100"]
  2. Restart the service:

    sudo systemctl restart prometheus

This README.md file provides all the necessary information to set up the Node Exporter on a server and integrate it with Prometheus.

About

This repository provides all the necessary information to set up the Node Exporter on a server and integrate it with Prometheus. You can upload it to GitHub for future reference or to share it with other team members.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published