Installing Prometheus Agent on a Public Cloud instance

Objective

Prometheus is a monitoring system and time series database. You can install and use its agent on OVHcloud Public Cloud instances to gather metrics from your servers and applications.

Find out how to install the Prometheus Node Exporter or Windows Exporter agent on an OVHcloud Public Cloud instance.

Warning

OVHcloud provides services for which you are responsible with regard to their configuration and management. It is therefore your responsibility to ensure that they function correctly.

This guide is designed to assist you in common tasks as much as possible. Nevertheless, we recommend contacting a specialist service provider or reaching out to our community if you experience any issues.

Requirements

Instructions

Follow these steps to install the Prometheus Node Exporter or Windows Exporter agent on your OVHcloud Public Cloud instance to collect metrics.

Step 1: Connecting to your instance

Connect to your instance via SSH:

ssh root@<INSTANCE_IP>

Replace <INSTANCE_IP> with the public IP address of your instance.

Info

On Windows, use PowerShell with SSH or an SSH client such as PuTTY if you prefer using a command-line interface.

For Windows Server with GUI, you can also use RDP (Remote Desktop).

Step 2: Updating your system

Make sure your system packages are up to date:

For Debian/Ubuntu
For CentOS/RHEL
For Windows
sudo apt update && sudo apt upgrade -y

Step 3: Creating a Prometheus user (Optional)

Creating a dedicated user for Node Exporter improves security on Linux, but is optional for Windows Exporter on Windows.

For Linux
For Windows
sudo useradd --no-create-home --shell /bin/false prometheus
  • This creates a user with limited permissions to run Node Exporter.
  • Recommended for production to reduce security risks.
  • You can then start Node Exporter under this user via systemd.

Step 4: Downloading Node Exporter / Windows Exporter

For Linux
For Windows (via SSH/PowerShell on the VM)
# Replace VERSION with the latest release, e.g., 1.10.2
VERSION="1.10.2"
wget https://github.com/prometheus/node_exporter/releases/download/v$VERSION/node_exporter-$VERSION.linux-amd64.tar.gz
tar xvf node_exporter-$VERSION.linux-amd64.tar.gz
cd node_exporter-$VERSION.linux-amd64

Step 5: Running Node Exporter / Windows Exporter

For Linux
For Windows (via SSH/PowerShell)
./node_exporter
  • Optional: set up a systemd service to run Node Exporter automatically.
  • If using the dedicated prometheus user, ensure the service runs under this account.

Step 6: Verifying Node Exporter / Windows Exporter

Info

Node Exporter listens on port 9100 by default.

Windows Exporter listens on port 9182 by default.

Replace <PORT> with 9100 for Linux or 9182 for Windows.

The command below allows you to monitor metrics such as CPU, memory, disk, and network usage:

curl http://<INSTANCE_IP>:<PORT>/metrics
Info

On Windows Desktop, you can also open a browser to check. However, via SSH/PowerShell, use curl or Invoke-WebRequest.

Step 7: Firewall/Security rules (OVHcloud)

Ensure that the port used by the exporter is open in both the VM firewall and your OVHcloud Security Group.

Restrict access to only your Prometheus server for security.

For Linux (Debian/Ubuntu with UFW)
For Windows
sudo ufw allow 9100/tcp
sudo ufw status

Note: If UFW shows Status: inactive, it means the firewall is not enabled on the VM. The port rule is added but not enforced.

Security is mainly handled by your OVHcloud Security Group.

If you want UFW active, first allow SSH to avoid being locked out:

sudo ufw allow ssh
sudo ufw enable
sudo ufw status

Step 8: Connecting Node Exporter / Windows Exporter to Prometheus

1. Edit Prometheus config on your Prometheus server (prometheus.yml):

scrape_configs:
  - job_name: 'node_exporter' # or 'windows_exporter'
    static_configs:
      - targets: ['<INSTANCE_IP>:9100'] # or 9182 for Windows Exporter

2. Reload Prometheus:

For Linux
For Windows
sudo systemctl reload prometheus

3. Node Exporter / Windows Exporter metrics from your OVHcloud instance should now appear in Prometheus.

Go further

Official Node Exporter documentation

Creating and configuring a security group in Horizon

Join our community of users.

Was this page helpful?