Skip to main content

🚀 Installing and Configuring Node Exporter

🧐 What is Node Exporter?

Node Exporter is a Prometheus exporter for system metrics, providing detailed insights into CPU, memory, disk, and network usage. It is installed directly on the target machine, allowing Prometheus to scrape real-time system metrics via HTTP.

📌 Step 1: Download and Extract Node Exporter

cd /tmp
wget https://github.com/prometheus/node_exporter/releases/download/v1.5.0/node_exporter-1.5.0.linux-amd64.tar.gz
tar -xvzf node_exporter-*.tar.gz
cd node_exporter-*-linux-amd64

📌 Step 2: Move the Binary to /usr/local/bin/

sudo mv node_exporter /usr/local/bin/

📌 Step 3: Create a Systemd Service File

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

Paste the following content:

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

[Service]
User=nobody
Group=nogroup
ExecStart=/usr/local/bin/node_exporter

[Install]
WantedBy=multi-user.target

📌 Step 4: Reload Systemd and Start the Service

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

📌 Step 5: Verify Installation

Test locally:

curl http://localhost:9100/metrics

Test remotely:

🔗 http://TARGET_SERVER_IP:9100/metrics

🔗 http://13.201.191.75:9100/metrics

📊 Why Use Node Exporter?

  • 📡 Real-time monitoring: Provides up-to-date system metrics.
  • 🔍 Granular insights: Collects detailed CPU, memory, disk, and network statistics.
  • 🔄 Seamless integration: Works smoothly with Prometheus for centralized monitoring.
  • Lightweight: Minimal resource usage on the target system.

Node Exporter is now running and ready to be scraped by Prometheus! 🚀