Prometheus scrapes metrics from your servers and stores them as time series. Grafana visualizes them. Together they give you a proper observability stack without paying for a SaaS product.
Installing node_exporter
node_exporter exposes system metrics — CPU, memory, disk, network — over HTTP so Prometheus can scrape them. Install it on every server you want to monitor:
wget https://github.com/prometheus/node_exporter/releases/download/v1.8.1/node_exporter-1.8.1.linux-amd64.tar.gz
tar xf node_exporter-1.8.1.linux-amd64.tar.gz
mv node_exporter-1.8.1.linux-amd64/node_exporter /usr/local/bin/
Create a systemd service:
[Unit]
Description=node_exporter
[Service]
ExecStart=/usr/local/bin/node_exporter
Restart=always
[Install]
WantedBy=multi-user.target
Enable and start: systemctl enable --now node_exporter. Metrics are available at http://localhost:9100/metrics.
Prometheus scrape config
global:
scrape_interval: 15s
scrape_configs:
- job_name: 'servers'
static_configs:
- targets:
- 'server1:9100'
- 'server2:9100'
- 'server3:9100'
First Grafana dashboard
After connecting Grafana to Prometheus as a data source, import dashboard ID 1860 — the Node Exporter Full dashboard. It covers everything: CPU usage, memory, disk I/O, network traffic, load average. No manual panel creation needed.