Reading time: ~14 minutes Audience: Homelabbers who want a single pane of glass for their infrastructure
What Is a Grafana Dashboard for Your Homelab?
Overview
Grafana is the open-source visualization platform that turns time-series data into beautiful, actionable dashboards. In a homelab, Grafana is the single pane of glass: CPU load, memory pressure, disk usage, network throughput, container health, and even UPS battery status—all in one place.
Why Grafana for homelabs: - Free and open source: AGPLv3. No feature limits. - Data source agnostic: Prometheus, InfluxDB, Loki, MySQL, PostgreSQL, Zabbix, and 100+ others. - Community dashboards: Import pre-built dashboards for Node Exporter, cAdvisor, Proxmox, Pi-hole, and more. - Alerting: Native alerting rules with email, Slack, Telegram, and webhook support. - Mobile-friendly: Responsive web UI works on tablets and phones.
Key Benefits
- Proactive maintenance: See disk fill-up before it happens
- Performance tuning: Identify which VM is consuming RAM or IOPS
- Capacity planning: Track 30-day trends to know when to upgrade
- Troubleshooting: Correlate events across multiple systems in one timeline
- Show off: A well-built Grafana dashboard is the homelab equivalent of a trophy case
Prerequisites
Hardware Requirements
| Component | Minimum | Recommended |
|---|---|---|
| CPU | 1 core | 2 cores |
| RAM | 512 MB | 1 GB |
| Storage | 1 GB | 5 GB (for dashboard JSON and logs) |
| Network | 1 GbE | 1 GbE |
Software Requirements
- Docker and Docker Compose
- A data source (Prometheus, InfluxDB, or both)
- Node Exporter and cAdvisor running on monitored hosts
Knowledge Prerequisites
- Basic Prometheus query language (PromQL) or InfluxQL
- Understanding of time-series data
- Familiarity with Docker networking
Step 1: Deploy Grafana with Docker Compose
Objective
Run Grafana as a container with persistent storage and pre-configured data sources.
Step-by-Step Instructions
- Create a directory for Grafana:
mkdir -p ~/grafana/config
cd ~/grafana
- Create
docker-compose.yml:
services:
grafana:
image: grafana/grafana:latest
container_name: grafana
restart: unless-stopped
ports:
- "3000:3000"
environment:
- GF_SECURITY_ADMIN_USER=admin
- GF_SECURITY_ADMIN_PASSWORD=*** - GF_USERS_ALLOW_SIGN_UP=false
- GF_SERVER_ROOT_URL=https://grafana.yourdomain.com
- GF_INSTALL_PLUGINS=grafana-clock-panel,grafana-simple-json-datasource
volumes:
- grafana-data:/var/lib/grafana
- ./config/datasources.yml:/etc/grafana/provisioning/datasources/datasources.yml
- ./config/dashboards.yml:/etc/grafana/provisioning/dashboards/dashboards.yml
- ./dashboards:/var/lib/grafana/dashboards
volumes:
grafana-data:
- Create
config/datasources.ymlto auto-provision Prometheus:
apiVersion: 1
datasources:
- name: Prometheus
type: prometheus
access: proxy
url: http://prometheus:9090
isDefault: true
editable: false
- name: InfluxDB
type: influxdb
access: proxy
url: http://influxdb:8086
database: homelab
editable: false
- Create
config/dashboards.ymlto auto-provision dashboard files:
apiVersion: 1
providers:
- name: 'homelab'
orgId: 1
folder: 'Homelab'
type: file
disableDeletion: false
updateIntervalSeconds: 10
allowUiUpdates: true
options:
path: /var/lib/grafana/dashboards
- Start the container:
docker compose up -d
- Access Grafana at
http://your-server-ip:3000(login: admin / password from env)
Step 2: Build the “Homelab Overview” Dashboard
Objective
Create a dashboard with panels for system metrics, Docker containers, and network.
Step-by-Step Instructions
-
In Grafana, click + > New Dashboard > Add visualization
-
Panel 1: CPU Usage (Stat)
- Data source: Prometheus
- Query:
100 - (avg by(instance) (irate(node_cpu_seconds_total{mode="idle"}[5m])) * 100) - Visualization: Stat
- Thresholds: Green < 60, Yellow < 80, Red > 80
-
Title: “CPU Usage”
-
Panel 2: Memory Usage (Gauge)
- Data source: Prometheus
- Query:
100 * (1 - (node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes)) - Visualization: Gauge
- Thresholds: Green < 70, Yellow < 85, Red > 85
-
Title: “Memory Usage”
-
Panel 3: Disk Usage (Table)
- Data source: Prometheus
- Query:
100 * (1 - node_filesystem_avail_bytes{fstype!="tmpfs"} / node_filesystem_size_bytes) - Visualization: Table
-
Title: “Disk Usage by Mount”
-
Panel 4: Network Traffic (Time Series)
- Data source: Prometheus
- Query A (RX):
irate(node_network_receive_bytes_total{device!="lo"}[5m]) - Query B (TX):
irate(node_network_transmit_bytes_total{device!="lo"}[5m]) - Visualization: Time Series
- Unit: bytes/sec (IEC)
-
Title: “Network Traffic”
-
Panel 5: Top 5 Containers by CPU (Bar Chart)
- Data source: Prometheus
- Query:
topk(5, rate(container_cpu_usage_seconds_total{name!=""}[5m])) - Visualization: Bar Chart
-
Title: “Top Containers by CPU”
-
Panel 6: Docker Container Health (Stat)
- Data source: Prometheus
- Query:
count(container_last_seen{name!=""}) - Visualization: Stat
-
Title: “Active Containers”
-
Save the dashboard as
homelab-overview.jsonin thedashboards/folder. Grafana will auto-load it.
Step 3: Import Community Dashboards
Objective
Import battle-tested dashboards for common homelab tools.
Step-by-Step Instructions
-
In Grafana, click + > Import Dashboard
-
Enter the dashboard ID and click Load:
| Tool | Dashboard ID | Name |
|---|---|---|
| Node Exporter | 1860 | Node Exporter Full |
| cAdvisor | 14282 | Docker and System Monitoring |
| Proxmox | 10347 | Proxmox via Prometheus |
| Pi-hole | 10176 | Pi-hole Exporter |
| AdGuard Home | 14400 | AdGuard Home |
| Unifi | 11306 | UniFi Poller |
| pfSense | 11694 | pfSense Telegraf |
| Speedtest | 13665 | Speedtest Tracker |
- Select your Prometheus data source
- Click Import
Step 4: Customize Panels and Variables
Objective
Add template variables so one dashboard serves multiple hosts.
Step-by-Step Instructions
-
In your dashboard, click Settings > Variables > New Variable
-
Create a variable named
node: - Data source: Prometheus
- Query:
label_values(node_uname_info, nodename) - Refresh: On Dashboard Load
- Multi-value: Yes
-
Include All option: Yes
-
Update your queries to use the variable:
# Before
100 - (avg by(instance) (irate(node_cpu_seconds_total{mode="idle"}[5m])) * 100)
# After
100 - (avg by(instance) (irate(node_cpu_seconds_total{mode="idle", nodename=~"$node"}[5m])) * 100)
- Now you can select specific hosts or “All” from a dropdown at the top of the dashboard.
Step 5: Set Up Alerts in Grafana
Objective
Create alerting rules directly in Grafana (separate from Alertmanager).
Step-by-Step Instructions
-
Go to Alerting > Alert Rules > New Alert Rule
-
Create a rule for disk space:
- Query:
100 * (1 - node_filesystem_avail_bytes / node_filesystem_size_bytes) > 90 - Evaluation: Every 1m for 5m
- Labels:
severity=critical -
Contact point: Telegram or Slack
-
Create a rule for high memory:
- Query:
100 * (1 - node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes) > 85 - Evaluation: Every 1m for 5m
-
Labels:
severity=warning -
Test the alert by temporarily lowering the threshold.
Pro Tips
Tip 1: Use Row Panels for Organization
Group related panels into collapsible rows. Common rows for a homelab dashboard: - Overview: CPU, memory, disk, uptime - Network: Traffic, errors, top talkers - Containers: CPU, memory, restart count - Storage: ZFS pool health, disk temperatures, IOPS - Services: Per-service panels (Nextcloud, Plex, Jellyfin)
Tip 2: Add Annotations for Events
Grafana annotations mark events on the timeline. Use the API to add annotations for deployments, reboots, or backups:
curl -X POST http://grafana:3000/api/annotations \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"dashboardId": 1,
"panelId": 1,
"time": '"$(date +%s)000"',
"tags": ["deployment", "nextcloud"],
"text": "Deployed Nextcloud 30.0.1"
}'
Tip 3: Export and Version Control Your Dashboards
Dashboard JSON should be in Git. Export via Share > Export > Save to file. Commit to a repo and use Grafana provisioning to auto-deploy. This prevents losing work and makes migrations trivial.
Troubleshooting Common Issues
Problem 1: “No Data” in Panels
Check: Ensure Prometheus is scraping the target. Go to Explore in Grafana and run the query manually. If no data, check the target in Prometheus (http://prometheus:9090/targets).
Fix: Common causes: wrong job name, container not on the same Docker network, or firewall blocking port 9100.
Problem 2: Dashboard Variables Not Working
Check: Verify the variable query returns values in Explore.
Fix: If the variable is empty, the label name may be wrong. Use label_values(node_uname_info) to see all available labels.
Problem 3: Slow Dashboard Loading
Check: Complex queries with high cardinality (many unique label combinations) can slow Grafana.
Fix: Add aggregation. Instead of container_cpu_usage_seconds_total, use sum by(name) (container_cpu_usage_seconds_total). Limit time ranges. Use recording rules in Prometheus for expensive queries.
Conclusion
Summary
Grafana is the visualization layer that makes your Prometheus data actionable. A well-built homelab dashboard gives you proactive insight into CPU, memory, disk, network, and container health. Community dashboards provide a fast starting point; custom panels and variables tailor the experience to your infrastructure.
Next Steps
- Import the Node Exporter Full dashboard (ID 1860)
- Build a custom “Homelab Overview” dashboard with your top 6 metrics
- Add template variables for multi-host monitoring
- Set up Grafana alerting for disk space and memory pressure
- Export your dashboards to JSON and commit them to Git
Affiliate Opportunities
- Mini PCs for Grafana: Minisforum, Beelink (Amazon)
- Displays: Wall-mounted tablets for dashboard kiosks (Amazon)
- VPS: Hetzner for offsite Grafana (referral)
Internal Linking Strategy
prometheus-setup→ guide: “prometheus-monitoring-homelab.md”alertmanager→ guide: “prometheus-alertmanager-setup.md”docker-monitoring→ guide: “docker-monitoring-grafana-prometheus.md”node-exporter→ guide: “prometheus-monitoring-homelab.md”
CTA
- [comment] Share a screenshot of your Grafana dashboard! What panels are essential for your homelab?
- [newsletter] Subscribe for our dashboard JSON packs and monitoring stack updates.
- [internal_link] Need to set up Prometheus first? Read our Prometheus monitoring guide next.