Self-Hosted Homelab Monitoring Stack: Uptime Kuma, Grafana, Prometheus, and cAdvisor

If you run multiple Docker containers in your homelab, answering questions like “Which service is eating CPU?”, “Why is disk usage climbing?”, and “Did that container restart overnight?” gets old fast. A lightweight monitoring stack on a single VPS or a dedicated Raspberry Pi gives you visibility without the operational weight of enterprise tooling.

Why Monitoring Matters in a Homelab

Homelabs are not static. Containers get updated, disks fill up, networks change, and services silently fail. Monitoring does not have to mean alerts every five minutes. At minimum, you want dashboards that show current state and enough history to spot trends before something breaks.

A small stack built around **Uptime Kuma**, **Grafana**, **Prometheus**, and **cAdvisor** covers most needs without consuming much RAM or storage.

Stack Overview

  • Uptime Kuma — HTTP, TCP, and ping monitors with notifications
  • Prometheus — metric collection and storage
  • Grafana — dashboards for system and container metrics
  • cAdvisor — container resource usage exporter
  • Node Exporter — host system metrics

Docker Compose Setup

Create a dedicated monitoring folder on your server. Inside it, create docker-compose.yml:

version: "3.8"
services:
  cadvisor:
    image: gcr.io/cadvisor/cadvisor:latest
    container_name: cadvisor
    restart: unless-stopped
    ports:
      - "8081:8080"
    volumes:
      - /:/rootfs:ro
      - /var/run:/var/run:ro
      - /sys:/sys:ro
      - /var/lib/docker/:/var/lib/docker:ro

  node-exporter:
    image: prom/node-exporter:latest
    container_name: node-exporter
    restart: unless-stopped
    pid: host
    network_mode: host

  prometheus:
    image: prom/prometheus:latest
    container_name: prometheus
    restart: unless-stopped
    ports:
      - "9090:9090"
    volumes:
      - ./prometheus:/etc/prometheus
      - prometheus-data:/prometheus
    command:
      - '--config.file=/etc/prometheus/prometheus.yml'

  grafana:
    image: grafana/grafana:latest
    container_name: grafana
    restart: unless-stopped
    ports:
      - "3000:3000"
    environment:
      - GF_SECURITY_ADMIN_PASSWORD=change_me
    volumes:
      - grafana-data:/var/lib/grafana

  uptime-kuma:
    image: louislam/uptime-kuma:1
    container_name: uptime-kuma
    restart: unless-stopped
    ports:
      - "3001:3001"
    volumes:
      - uptime-kuma-data:/app/data

volumes:
  prometheus-data:
  grafana-data:
  uptime-kuma-data:

Start the stack:

docker compose up -d

Prometheus Configuration

Create prometheus/prometheus.yml:

global:
  scrape_interval: 15s

scrape_configs:
  - job_name: cadvisor
    static_configs:
      - targets: ['cadvisor:8080']

  - job_name: node-exporter
    static_configs:
      - targets: ['node-exporter:9100']

Reload Prometheus after changes:

docker compose exec prometheus kill -HUP 1

Grafana Dashboards

Open Grafana at http://your-server:3000 and log in with the admin password you set. Add Prometheus as a data source using http://prometheus:9090.

Import useful community dashboards:

  • Docker and system monitoring: dashboard ID 179
  • Node Exporter Full: dashboard ID 1860
  • cAdvisor Exporter: dashboard ID 893

These give you CPU, memory, disk, network, and container-level metrics within minutes.

Uptime Kuma

Uptime Kuma lives at http://your-server:3001. Create an admin account, then add monitors for critical services. Supported monitor types include HTTP, TCP, DNS, ping, and Docker container status.

Hook up notifications through Telegram, Discord, email, or webhooks. That way, downtime shows up in the same chat where you already discuss your homelab.

Alerting Strategy

Start with high-signal alerts rather than noisy ones. Good candidates:

  • Disk usage above 80 percent
  • Container restart count spikes
  • HTTP endpoint down for more than two minutes
  • System load above a threshold for several minutes

Avoid alerting on transient blips. Short-lived spikes in CPU or memory are normal on a homelab. Alert on sustained problems instead.

Final Thoughts

A small monitoring stack changes how you manage a homelab. Instead of reacting to broken services, you start spotting problems before they affect users or data. Uptime Kuma, Grafana, Prometheus, and cAdvisor are mature, easy to deploy, and light enough to run alongside your existing services.

Start with dashboards, add notifications later, and refine alerts from real incidents rather than guessing what matters.

Related Posts

3 thoughts on “Self-Hosted Homelab Monitoring Stack: Uptime Kuma, Grafana, Prometheus, and cAdvisor”

Leave a Comment