Monitoring a Home Server: Netdata, Prometheus, and Grafana
Monitoring a home server splits into two questions that people frequently conflate. What is happening right now, and what happened last Tuesday. Different tools answer them well.
Netdata, for right now
Netdata collects hundreds of metrics per second and presents them in a dashboard with no configuration.
curl https://get.netdata.cloud/kickstart.sh > /tmp/netdata-kickstart.sh
sh /tmp/netdata-kickstart.sh
Then open port 19999 and everything is there: CPU per core, memory breakdown, disk I/O per device, network per interface, and automatic detection of services like nginx, PostgreSQL, and Docker containers.
The per-second resolution is genuinely useful for catching brief spikes that a fifteen-second scrape interval misses entirely.
The tradeoff is retention. Netdata keeps a limited window by default, so it answers “what is happening” much better than “what happened last week.”
Do not expose it directly to the internet. Put it behind a reverse proxy with authentication or reach it over a VPN.
Prometheus and Grafana, for history
Three separate pieces, which is the thing to understand before configuring anything:
- Exporters expose metrics over HTTP
- Prometheus scrapes those endpoints and stores time series
- Grafana queries Prometheus and draws dashboards
Prometheus does not collect metrics itself and does not draw graphs. Almost all early confusion comes from expecting it to do both.
node_exporter
# On each machine you want to monitor
sudo useradd --system --no-create-home --shell /usr/sbin/nologin node_exporter
# download and install the binary to /usr/local/bin, then:
sudo systemctl enable --now node_exporter
curl localhost:9100/metrics | head
Our systemd unit builder generates the service file.
Prometheus
# prometheus.yml
global:
scrape_interval: 15s
scrape_configs:
- job_name: 'nodes'
static_configs:
- targets:
- 'server1:9100'
- 'server2:9100'
Docker Compose is the easiest way to run Prometheus and Grafana together, and our compose generator produces the file.
Set retention explicitly:
--storage.tsdb.retention.time=90d
Ninety days of a few hosts is a small number of gigabytes. The format compresses time series well.
Grafana
Add Prometheus as a data source, then import a community dashboard rather than building one. Dashboard 1860 for node_exporter is the standard starting point and covers nearly everything about a host.
Build your own only for the handful of things specific to your setup.
Alerting, which is the point
A dashboard nobody looks at is not monitoring. Alerts are what turn it into something useful.
groups:
- name: basics
rules:
- alert: DiskAlmostFull
expr: node_filesystem_avail_bytes{mountpoint="/"} / node_filesystem_size_bytes{mountpoint="/"} < 0.10
for: 10m
annotations:
summary: "Less than 10% disk free on {{ $labels.instance }}"
- alert: HostDown
expr: up == 0
for: 5m
annotations:
summary: "{{ $labels.instance }} is not responding"
Alertmanager handles routing and can send to email, ntfy, Gotify, or a messaging service.
What to alert on
Symptoms, not causes:
- Disk approaching full, which is the single most common cause of an outage on a home server
- A service not responding
- A TLS certificate expiring within a fortnight
- A backup job that did not complete
- Unusually high load sustained over time
Do not alert on every metric that moves. Alert fatigue is real, and an alert you routinely ignore is worse than none, because it trains you to ignore the next one too.
The pragmatic setup
For one machine, Netdata alone is enough, and it takes five minutes.
For several machines, or if you want history and alerts, Prometheus with Grafana and node_exporter on each host, plus a blackbox exporter to probe your services from outside.
Running both is common: Netdata for detailed investigation on a specific host, Prometheus for the long view and alerting.
Whichever you choose, do the alerting part. Graphs are satisfying and it is the alert at two in the morning that actually saves you.
Frequently Asked Questions
Netdata or Prometheus and Grafana?
Netdata if you want detailed real-time dashboards immediately with essentially no configuration. Prometheus with Grafana if you want long-term history, alerting rules, and one place to see many machines. Running both is common and reasonable.
What does Prometheus actually do?
It scrapes numeric metrics from HTTP endpoints on a schedule and stores them as time series. It does not collect metrics itself and does not draw graphs. Exporters expose the metrics and Grafana draws them.
What is an exporter?
A small program that exposes metrics in the format Prometheus reads. node_exporter covers the host itself, and there are exporters for databases, web servers, and most common services, plus a blackbox exporter for probing endpoints externally.
How much disk does Prometheus need?
Far less than people expect. A handful of hosts with default settings will use a few gigabytes over months, because the storage format compresses time series aggressively. Set a retention period rather than letting it grow indefinitely.
Do I need alerting if I check the dashboard?
Yes, because you will not check it. Dashboards are for investigating a known problem; alerts are for finding out there is one. A monitoring setup without alerting mostly provides graphs to look at after an outage has already ended.
What should I actually alert on?
Symptoms rather than causes: disk nearly full, service down, certificate expiring, backup did not complete. Alerting on every metric that moves produces noise you will start ignoring, which is worse than no alerting at all.