DEV Community

Cover image for How to Add a Linux Target Node to Prometheus (Step-by-Step)
Ethan Vance
Ethan Vance

Posted on • Originally published at migservers.com

How to Add a Linux Target Node to Prometheus (Step-by-Step)

Hey everyone! 👋

Monitoring your infrastructure is super important for maintaining system health. If you already have a Prometheus server running, the next logical step is adding your servers to it.

In this quick guide, we will look at how to add a new Linux server (Target Node) to your existing Prometheus monitoring system using Node Exporter. Node Exporter collects system metrics such as CPU, memory, and disk usage, which Prometheus then scrapes.


📌 Prerequisites

  • A running Prometheus Server.
  • A new Target Node (the Linux server you want to monitor).
  • Root or sudo privileges on both servers.

Step 1: Install Node Exporter on the Target Node

To monitor the new Target Node, Node Exporter must be installed and running. On most RHEL-based distributions (like AlmaLinux, Rocky Linux, or CentOS), you can install it using:

dnf install -y prometheus-node-exporter
Enter fullscreen mode Exit fullscreen mode

Note: If the package is unavailable, you may need to enable the EPEL or CRB repository first.

Step 2: Verify Node Exporter is Running

To monitor the new Target Node, Node Exporter must be installed and running. On most RHEL-based distributions (like AlmaLinux, Rocky Linux, or CentOS), you can install it using:

On your Target Node, run:

curl http://localhost:9100/metrics
Enter fullscreen mode Exit fullscreen mode

If it's working correctly, you will immediately see a long list of system metrics printed on your terminal.

🚀 Want to complete the setup?
We have successfully installed Node Exporter, but to finish the setup we still need to:

  1. Open Port 9100 in your Firewall
  2. Configure the Main Prometheus Server (prometheus.yml)
  3. Verify the Target in the Web UI
  4. Test metrics with PromQL Queries

View Full Tutorial:

How to Add Linux Target Nodes to Prometheus Monitoring

👇 Let me know in the comments if you face any issues while setting this up!

Top comments (0)