prometheus and prometheus-node-exporter with sudo apt install (Ubuntu/Debian), add Grafana from Grafana’s APT repository, then in Grafana add a Prometheus data source at http://localhost:9090 and import dashboard ID 1860 (Node Exporter Full). node_exporter exposes system metrics on port 9100, Prometheus stores them, and Grafana draws the charts on port 3000.
Before you start
- Connect with SSH as a user with
sudo. Root users can leave outsudo. - How the parts fit together:
- All three listen on every network interface by default. This guide binds them to localhost and reaches them through an SSH tunnel, so nothing is exposed.
- On AlmaLinux or Rocky Linux, Grafana installs from Grafana’s RPM repository, but Prometheus and node_exporter are not in the base repositories. Use the official release binaries from prometheus.io/download or run them with Docker.
How to install Prometheus and node_exporter
1
Install the packages
2
Check the scrape config
The packaged After any edit, validate the file:
/etc/prometheus/prometheus.yml already scrapes Prometheus itself and node_exporter:3
Keep both on localhost
Edit Edit
/etc/default/prometheus and set:/etc/default/prometheus-node-exporter and set:4
Restart
How to install Grafana
1
Add Grafana's signing key and repository
2
Install Grafana OSS
3
Bind Grafana to localhost
Open Remove the
/etc/grafana/grafana.ini, find the [server] section and set:; in front of the line if there is one; a leading ; means the line is a comment.4
Start Grafana and enable it at boot
How to connect Grafana to Prometheus
1
Open an SSH tunnel
On your own computer:Leave it open and browse to
http://localhost:3000.2
Sign in and change the password
Sign in with username
admin and password admin. Grafana asks you to set a new password straight away. Do it.3
Add the Prometheus data source
Go to Connections, add a new connection, search for Prometheus and select Prometheus data source, then add a new data source. Set Prometheus server URL to
http://localhost:9090 and click Save & test. You should see Successfully queried the Prometheus API.4
Import the Node Exporter Full dashboard
Click Dashboards, then New > Import dashboard. Enter
1860, click Load, select your Prometheus data source and click Import.node job. Some panels (systemd units, process counts) stay empty unless node_exporter runs with --collector.systemd --collector.processes; add them to ARGS in /etc/default/prometheus-node-exporter if you want those panels.
How to monitor more servers
Installprometheus-node-exporter on each extra server, let it listen on its private or public address, and allow port 9100 only from your Prometheus server’s IP in that server’s firewall. Then add the target to /etc/prometheus/prometheus.yml on the Prometheus server:
promtool check config and run sudo systemctl reload prometheus.
How to check it worked
127.0.0.1. In Prometheus (tunnel port 9090, then http://localhost:9090), open Status > Targets: both jobs should be UP.
Frequently asked questions
How long does Prometheus keep data?
15 days unless you change it. Set--storage.tsdb.retention.time=30d in ARGS in /etc/default/prometheus to keep 30 days, and check you have the disk space.
Can Prometheus send alerts?
Yes, through Alertmanager (sudo apt install prometheus-alertmanager) and alerting rules. Grafana also has its own alerting. For a simple “server is down” email, an external checker is easier: see email alerts when your server goes down.
Should I run Prometheus on the server I monitor?
It is fine for one server. If that server goes down, so does your monitoring, so for several servers run Prometheus and Grafana on a separate small server.Is there a simpler option?
Netdata gives live dashboards with one install script and no configuration.Related guides
VPS and dedicated server guides
Every server guide in one place.
Set up Netdata
One-script real-time dashboards.
Email alerts when your server goes down
Uptime checks from outside.
Nginx as a reverse proxy
Publish Grafana with HTTPS.
Set up a firewall with UFW
Keep metric ports closed.
Checked against the official Prometheus and Grafana installation documentation and the Node Exporter Full dashboard page on 4 November 2026; Prometheus and node_exporter packages, config check and listen flags tested on Ubuntu 24.04 LTS. The Grafana steps follow Grafana’s documentation and were not run. Commands can differ on other distributions or releases.
Need Extra Help?
If you encounter any issues, our support team is ready to assist:- Live Chat: Quick assistance via our website.
- Support Ticket: Open a Ticket
- Discord: Join our Community
- Email: support@freakhosting.com
Last Updated: November 2026