Monitoring

Infrastructure Monitoring & Alerting Plan

Executive Summary

This document establishes the architecture, service inventory, and phased rollout plan for comprehensive telemetry, uptime monitoring, and alerting across the self-hosted infrastructure (ul.drheck.dev) and external nodes (rng.drheck.dev).


1. Current Infrastructure Inventory

Primary Host (ul.drheck.dev)

External VPS (rng.drheck.dev)


2. Monitoring Architecture & Topology

                      ┌───────────────────────────────────────────┐
                      │          Off-Site VPS (rng.drheck.dev)    │
                      │  - Uptime Kuma (Blackbox & SSL Prober)    │
                      │  - External WAN/DNS/Port Health Probes    │
                      │  - Independent Alert Routing (ntfy/Pushover)│
                      └─────────────────────┬─────────────────────┘
                                            │ Probes *.drheck.dev (HTTPS/IPv6/IPv4)
                                            ▼
┌────────────────────────────────────────────────────────────────────────────────────────┐
│  Primary Host (ul.drheck.dev)                                                          │
│                                                                                        │
│  [ Telemetry Exporters ]                                                               │
│   ├── node_exporter         (Host CPU, RAM, NVMe I/O, Network, Systemd)                │
│   ├── cAdvisor              (Per-container CPU, Memory, Network, Restart Loops)        │
│   ├── nginx-prometheus      (Request rates, 4xx/5xx error spikes, upstream latencies)  │
│   ├── postgres_exporter     (DB connections, query latency, lock monitoring)           │
│   └── smartctl_exporter     (NVMe wear, drive temperatures, hardware health)           │
│                                                                                        │
│  [ Time-Series Storage & Dashboards ]                                                  │
│   ├── VictoriaMetrics       (High-efficiency TSDB, low memory footprint, PromQL)       │
│   └── Grafana               (Unified dashboards & visual panels)                       │
│                                                                                        │
│  [ Alert Engine ]                                                                      │
│   └── Alertmanager          (Routes internal metrics -> Telegram / ntfy / Matrix)      │
└────────────────────────────────────────────────────────────────────────────────────────┘

3. Core Component Roles

A. External Canary (Uptime Kuma on rng)

B. Host & Container Telemetry (VictoriaMetrics + cAdvisor + Exporters on ul)

C. Unified Visualization (Grafana on ul)


4. Phased Rollout Plan

Phase 1: External Sentinel (rng.drheck.dev)

  1. Deploy Uptime Kuma under /home/luke/docker/uptime-kuma on rng using rootless Podman.
  2. Configure HTTP(s), TCP, and SSL certificate monitors for all public services on drheck.dev.
  3. Configure notification webhooks (e.g. ntfy.sh, Telegram, or Gotify) for instant push alerts to mobile devices.

Phase 2: Exporter Deployment (ul.drheck.dev)

  1. Deploy node_exporter as a native systemd unit or container (listening on 127.0.0.1:9100).
  2. Deploy prometheus-podman-exporter / cAdvisor as a rootless Podman Quadlet reading /run/user/1100/podman/podman.sock and /sys/fs/cgroup.
  3. Add smartctl_exporter for continuous NVMe drive telemetry.

Phase 3: Time-Series DB & Grafana Stack (ul.drheck.dev)

  1. Create rootless Podman Quadlets under /data/docker/monitoring/ linked into /home/docker-data/.config/containers/systemd/ with:
    • victoriametrics (TSDB storage)
    • grafana (Dashboard UI)
    • vmagent or Prometheus scraping configuration
  2. Configure scrape jobs for node_exporter, cAdvisor, Nginx metrics, and database exporters.
  3. Expose Grafana behind Nginx at monitor.drheck.dev (secured with Authentik SSO).

Phase 4: Alert Rules & Thresholds

Define critical alert rules in VictoriaMetrics / Alertmanager:

Phase 5: Verification & Drills

  1. Perform synthetic service termination drill (e.g. test container stop) to verify alert firing and recovery notification.
  2. Verify dashboard graphs and metric retention policies.