0. Requirements
The guide is suitable for Ubuntu 22.04 and 24.04.
Before you start, make sure that all three tools are installed on the same VPS:
You will also need SSH access with root or sudo privileges.
1. Check that all services are running
First, connect to your VPS via SSH.
Now check the status of each service:
sudo systemctl status node_exporter
sudo systemctl status prometheus
sudo systemctl status grafana-server
All three of them should be in the active (running) state.
If one of the services is not running, you can start all of them with this command:
sudo systemctl start node_exporter prometheus grafana-server
2. Verify the Prometheus connection
Node Exporter collects the system metrics, and Prometheus retrieves and stores them.
If you followed our Prometheus installation guide, Node Exporter is already configured as a target in Prometheus.
To check if Prometheus receives the metrics, run this command:
curl -G http://127.0.0.1:9090/api/v1/query --data-urlencode 'query=up{job="node_exporter"}'
In the response, look for "value":[...,"1"].
The value 1 means that Prometheus successfully collects metrics from Node Exporter.
3. Connect Grafana to Prometheus
Now we need to set up Grafana, so it can show the metrics collected by Prometheus.
Open Grafana in your browser:
http://YOUR_VPS_IP:3000
Replace YOUR_VPS_IP with the IP address of your VPS.
Log in with your Grafana credentials.
After that, follow these steps:
Go to Connections → Add new connection.
Search for Prometheus.
Select Prometheus and click Add new data source.
In the Prometheus server URL field, enter:
http://localhost:9090
Scroll down and click Save & test.
If everything is fine, you will see this message:
Successfully queried the Prometheus API.
Now Grafana is connected to Prometheus.
Please note. We can use localhost here because Grafana and Prometheus are installed on the same VPS.
4. Create a monitoring dashboard
Now that Grafana is connected, we can create a dashboard to monitor the server.
We don't need to build it from scratch, because we can use a ready-made Node Exporter dashboard.
In Grafana, open Dashboards.
Click New → Import dashboard.
Enter the dashboard ID:
1860
Click Load.
Click Import.
This will import the Node Exporter Full dashboard.
Now you can see the CPU usage, RAM consumption, disk activity, network traffic and other metrics of your server.





