Need Assistance?

In only two hours, with an average response time of 15 minutes, our expert will have your problem sorted out.

Server Trouble?

For a single, all-inclusive fee, we guarantee the continuous reliability, safety, and blazing speed of your servers.

How to Install and Configure Node Exporter on a Client for Prometheus Monitoring

Table of Contents

Monitoring infrastructure is crucial for system administrators and DevOps teams. Prometheus, a powerful open-source monitoring and alerting toolkit, is widely used for collecting and visualizing system metrics. However, to monitor a remote system, you need an agent running on that system and Node Exporter is Prometheus’ recommended tool for this job.

Prerequisites

Before proceeding:

What is Node Exporter?

It is a Prometheus exporter for hardware and OS metrics. It runs on client machines and makes system statistics available via HTTP on port 9100. Prometheus scrapes these metrics and stores them for querying and visualization.

Step-by-Step: Installing Node Exporter on Client Machines

Repeat the following steps on every client machine you wish to monitor.

1. Open Port 9100 (If Using a Firewall)

It exposes metrics on port 9100. Make sure this port is open.

2. Download the Latest Node Exporter Release

First, navigate to the Prometheus Node Exporter GitHub releases page and find the latest version.

For example, to download version 1.5.0, run:

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

3. Extract and Install

tar xvfz node_exporter-1.5.0.linux-amd64.tar.gz
sudo mv node_exporter-1.5.0.linux-amd64/node_exporter /usr/local/bin

4. Run Node Exporter (Two Options)

Option A: Run Manually (For Testing)

node_exporter

You’ll see logs confirming that metrics are being collected.

Option B: Run as a Systemd Service (Recommended)

1. Create a dedicated user:

sudo useradd -rs /bin/false node_exporter

2. Create a systemd service file:

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

 Add the following:

[Unit]
Description=Node Exporter
Wants=network-online.target
After=network-online.target

[Service]
User=node_exporter
Group=node_exporter
Type=simple
Restart=on-failure
RestartSec=5s
ExecStart=/usr/local/bin/node_exporter

[Install]
WantedBy=multi-user.target

3. Enable and start the service:

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

4. Confirm it’s running:

sudo systemctl status node_exporter

5. Verify Node Exporter

Open your browser and go to: http://client_ip_address:9100

You should see the interface. Click the Metrics link to view the exported system metrics.

Configuring Prometheus to Monitor Clients

Once it is running on your clients, you need to update the Prometheus configuration to start collecting data from them.

1. Edit Prometheus Configuration

On the monitoring server, open the config file:

sudo vim /etc/prometheus/prometheus.yml

Add a new job under scrape_configs:

...
- job_name: "remote_collector"
  scrape_interval: 10s
  static_configs:
    - targets: ["remote_addr:9100"]

Replace remote_addr with the actual IP addresses of your client machines.

2. Restart Prometheus

Apply the changes by restarting Prometheus:

sudo systemctl restart prometheus

3. Verify in Prometheus UI

  • Open the Prometheus web interface: http://<prometheus_server_ip>:9090
  • Go to Status > Targets
  • You should now see a job named remote_collector with each client IP listed
  • Click on the UP links to confirm the metrics are available

Conclusion

By installing and configuring Node Exporter on your client machines, you can now easily monitor critical system metrics like CPU, memory, disk, and network usage using Prometheus. This setup provides real-time visibility into your infrastructure’s health and performance.

Need help setting up or managing Node Exporter for Prometheus? Our Server Management Services team will handle the configuration, monitoring, and optimization for you.

Liked!! Share the post.

Get Support right now!

Start server management with our 24x7 monitoring and active support team

Let us know your requirement.

Can't get what you are looking for?

Get Support Right Away!