Skip to content

Monitoring Setup

Grafana Command Center — infrastructure health at a glance

One place to look: Grafana. Metrics, logs and alerts all end up there, and alerts reach the phone through self-hosted ntfy.

Stack

Tool Purpose
Prometheus Metrics collection and storage
Loki Log storage (30-day retention)
Grafana Alloy Agent that ships Docker logs, syslog and container metrics
Grafana Dashboards and alerting (~36 rules)
ntfy Self-hosted push notifications (deny-all auth, per-service accounts)
Uptime Kuma Availability checks — and the watcher of the watchers
Homepage Service dashboard

All of it runs in one Docker Host LXC on the Management VLAN (docker-mon).

How Data Flows

graph LR
    subgraph SOURCES["Sources"]
        NODES["Proxmox nodes<br/>node_exporter + pve-exporter"]
        GUESTS["LXCs & VMs<br/>node_exporter / Alloy"]
        FW["OPNsense<br/>metrics + remote syslog"]
        NAS["TrueNAS<br/>Graphite"]
        HA["Home Assistant<br/>/api/prometheus"]
        APPS["Frigate · Wazuh · CrowdSec<br/>UniFi (unpoller) · Uptime Kuma"]
        PROBES["Blackbox probes<br/>cameras · HTTPS sites + certs<br/>internet · DNS"]
    end

    PROM["Prometheus"]
    LOKI["Loki"]
    GRAF["Grafana<br/>dashboards + alert rules"]
    NTFY["ntfy"]
    PHONE["📱 Phones"]
    KUMA["Uptime Kuma"]

    NODES --> PROM
    GUESTS --> PROM
    GUESTS -->|"Docker logs"| LOKI
    FW --> PROM
    FW -->|"syslog: filterlog, suricata,<br/>unbound, sshd"| LOKI
    NAS -->|"graphite-exporter"| PROM
    HA --> PROM
    APPS --> PROM
    PROBES --> PROM
    PROM --> GRAF
    LOKI --> GRAF
    GRAF --> NTFY --> PHONE
    KUMA -->|"only: is Prometheus/Grafana up?"| NTFY
    PROM -.->|"checks every other Kuma monitor"| KUMA

Alerting Design

Grafana alerting replaced Prometheus Alertmanager. Rules are grouped by folder:

Folder Examples
Infra / storage Thin pool filling, Proxmox storage nearly full, guests without backup
Infra / containers Restart loop, near memory limit
Infra / network UniFi device offline, internet running on 4G backup, 4G data allowance running out
Security CrowdSec not blocking, Suricata silent or falling behind, IoT device tried to reach a private network
Services Internet down, DNS failing, service unreachable, certificate expiring
House Camera unreachable, camera stream stalled, recordings disk nearly full, Zigbee bridge down
Ops Scrape target down, agent silent, logs stopped arriving

Design choices that cut noise:

  • Uptime Kuma watches the watchers. It only notifies when Prometheus or Grafana itself is down. Every other Kuma check is turned into a Grafana rule, so there's one alert path.
  • Retries before paging. Kuma's Grafana check waits 3 × 60 s, so a one-minute DNS blip doesn't wake anyone.
  • Count new connections only. The "IoT device tried to reach a private network" rule ignores TCP teardown packets (FIN/ACK/RST) from flows that were allowed, which otherwise looked like violations.
  • Grouping: by folder + alert name, repeat every 4 h (critical: 1 h).

Home/energy alerts stay in Home Assistant, and Wazuh and TrueNAS keep their own alerting — all of them also publish to ntfy topics.

ntfy

  • Auth is deny-all; each service has its own account and topic (alerts-grafana, alerts-ha, alerts-nas, security-wazuh, infra-uptime, …)
  • Phones use the ntfy Android app with a dedicated read account
  • Reached on its direct address rather than through Caddy (its streaming connections didn't work through the proxy)

Prometheus Configuration

The structure of the main jobs (addresses redacted) lives in docker/monitoring/prometheus/prometheus.yml. Highlights:

  • node_exporter textfile collector on every Linux host exports apt_upgrades_pending and node_reboot_required, which feed the updates dashboard
  • TrueNAS sends Graphite metrics to a graphite-exporter container, which turns them into Prometheus series
  • https-services probes every Caddy name and alerts before a certificate expires
  • Home Assistant's long-lived token is mounted from a file, never written into the config

Dashboards

  • GoozLab Home — default landing page
  • GoozLab Command Center — Proxmox, NAS, firewall, cameras, network, uptime
  • GoozLab Updates — pending OS, container, Home Assistant and appliance updates in one view
  • Security — Suricata, CrowdSec, firewall blocks
  • Node Exporter Full (community ID 1860) for drilling into a single host

What To Monitor First

If you're building your own, start with these:

  1. Disk and thin-pool usage — especially the NAS and Proxmox local storage
  2. Service down — every critical service, from outside the host it runs on
  3. Backups — alert when a guest has no recent backup
  4. Certificates — expiry, with days of warning
  5. The monitoring itself — something independent must tell you when Grafana or Prometheus is down