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
sudoprivileges 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
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
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:
- Open Port 9100 in your Firewall
- Configure the Main Prometheus Server (
prometheus.yml) - Verify the Target in the Web UI
- 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)