Homelab automation with Jennifer

Jennifer

One nightly script that asks every box in the rack how it is doing and sends a single summary: Proxmox™, Synology™, Unraid™, Frigate™ and Docker™.

November 2026, by @mplx.
Based on Jennifer 0.27.0

Powered by Jennifer's Cantrip - Markdown into slide decks, https://github.com/jennifer-language/cantrip
1 / 18

The lab and the question

BoxWhat we want to know
Proxmox VEproduction guests running, storage not full, backups OK
Synology NASvolumes healthy, disks not failing, Hyper Backup™ done
Unraid serverarray started, disk errors, containers that should run
Frigate NVRpeople seen overnight, cameras that keep dropping
Docker hostcontainers that are not running

Goal: one notification at 06:00, quiet when all is well, exit code 1 when not.

2 / 18

Five decks, one per API

DeckSpeaksSigns in with
@deckyard/proxmoxREST, /api2/jsonAPI token
@deckyard/synologyDSM™ Web API, entry.cgiaccount and password, a session
@deckyard/unraidGraphQLAPI key
@deckyard/frigateREST, /apiuser and password (port 8971)
@deckyard/dockerDocker Engine APInone: guard the socket
jvc add @deckyard/proxmox
jvc add @deckyard/synology   # ... and the other three
3 / 18

Credentials: read-only, from the environment

EnvironmentFile=/etc/homelab-report.env   # mode 0600, root only
4 / 18

Proxmox: guests and tags

def c as proxmox.Client init proxmox.withToken(
    proxmox.client(os.getEnv("PVE_URL")),
    os.getEnv("PVE_TOKEN_ID"), os.getEnv("PVE_SECRET"));
for (def g in proxmox.guests($c)) {
    if ($g.template) { continue; }
    $total = $total + 1;
    if ($g.status == "running") {
        $running = $running + 1;
    } elseif (lists.contains($g.tags, "prod")) {
        $out[] = "WARN proxmox: {$g.name} ({$g.vmid}) is {$g.status}";
    }
}
WARN proxmox: gitea (102) is stopped
5 / 18

Proxmox: storage and last night's backups

for (def n in proxmox.nodes($c)) {
    for (def s in proxmox.storages($c, $n.node)) {
        def p as int init percent($s.used, $s.total);
        if ($s.active and $p >= FULL_PERCENT) { ... }
    }
}
for (def t in proxmox.recentTasks($c)) {
    if ($t.status == "stopped" and $t.exitStatus != "OK") { ... }
}
WARN proxmox: storage local-zfs on pve1 is 90% full
WARN proxmox: vzdump 102 failed: ERROR: guest 102 is not running
ok   proxmox: 2 of 4 guests running
6 / 18

Synology: a session, volumes and disks

def c as synology.Client init synology.login(
    synology.client(os.getEnv("DSM_URL")),
    os.getEnv("DSM_USER"), os.getEnv("DSM_PASSWORD"));
defer synology.logout($c);
for (def d in synology.disks($c)) {
    if ($d.smartStatus != "normal" or $d.temperature > 50) {
        $out[] = "WARN synology: {$d.name} SMART {$d.smartStatus}, " +
            "{$d.temperature} C";
    }
}
WARN synology: Drive 2 SMART failing, 41 C
7 / 18

Synology: did Hyper Backup run?

for (def b in synology.backupTasks($c)) {
    def s as synology.BackupTask init synology.backupStatus($c, $b.id);
    if ($s.lastResult != "done") {
        $out[] = "WARN synology: backup {$s.name}: {$s.lastResult} " +
            "at {$s.lastTime}";
    }
}
WARN synology: backup photos: failed at 2026-11-18 02:30
ok   synology: volumes, disks and backups checked
8 / 18

Unraid: the array over GraphQL

def c as unraid.Client init unraid.withApiKey(
    unraid.client(os.getEnv("UNRAID_URL")), os.getEnv("UNRAID_KEY"));
def a as unraid.StorageArray init unraid.array($c);
for (def d in $a.disks) {
    if ($d.errors > 0 or $d.status != "DISK_OK") { ... }
}
for (def ct in unraid.containers($c)) {
    if ($ct.autoStart and $ct.state != "RUNNING") { ... }
}
WARN unraid: disk3 DISK_OK, 12 errors
WARN unraid: container paperless is Exited (137) 3 hours ago
ok   unraid: array STARTED, 60% used
9 / 18

Frigate: who came by, which camera drops

def since as int init time.unix(time.now()) - 24 * 3600;
def people as list of frigate.Event init frigate.events($c,
    ["after={$since}", "label=person", "limit=20"]);
for (def cam in frigate.cameraStats($c)) {
    if ($cam.cameraFps == 0.0 or $cam.reconnects > 3) { ... }
}
note frigate: person on driveway at 02:14 UTC
WARN frigate: camera garden: poor, 7 reconnects
ok   frigate: 1 person event(s) in 24 hours
10 / 18

Docker: everything that is not running

def c as docker.Client init docker.negotiate(
    docker.client(os.getEnv("DOCKER_URL")));   # tcp://127.0.0.1:2375
def all as list of docker.Container init docker.containers($c, true, []);
for (def ct in $all) {
    if ($ct.state != "running") {
        $out[] = "WARN docker: {$ct.name} ({$ct.image}) is {$ct.state}: " +
            "{$ct.status}";
    }
}
WARN docker: uptime-kuma (louislam/uptime-kuma:1) is restarting: Restarting (1) 20 seconds ago
11 / 18

One failure must not hide the rest

func guarded(name as string) {
    try {
        match ($name) {
            when "proxmox" { return checkProxmox(); }
            # ... synology, unraid, frigate
            else { return checkDocker(); }
        }
    } catch (e) {
        return ["FAIL {$name} ({$e.kind}): {$e.message}"];
    }
}
FAIL docker (net): net.connect: 127.0.0.1:2375: dial tcp 127.0.0.1:2375: connect: connection refused
12 / 18

Five checks at once

def checks as list of task of list of string;
for (def name in ["proxmox", "synology", "unraid", "frigate", "docker"]) {
    $checks[] = spawn {
        return guarded($name);
    };
}
for (def t in $checks) {
    for (def line in task.wait($t)) {
        $lines[] = $line;
    }
}
13 / 18

The report

WARN proxmox: gitea (102) is stopped
WARN proxmox: storage local-zfs on pve1 is 90% full
WARN proxmox: vzdump 102 failed: ERROR: guest 102 is not running
ok   proxmox: 2 of 4 guests running
WARN synology: Drive 2 SMART failing, 41 C
WARN synology: backup photos: failed at 2026-11-18 02:30
WARN unraid: disk3 DISK_OK, 12 errors
WARN unraid: container paperless is Exited (137) 3 hours ago
note frigate: person on driveway at 02:14 UTC
WARN frigate: camera garden: poor, 7 reconnects
WARN docker: uptime-kuma (louislam/uptime-kuma:1) is restarting: ...
ok   docker: 3 containers
14 / 18

Sending it

def importance as string init "INFO";
if ($warnings > 0) { $importance = "WARNING"; }
unraid.notify($u, "Homelab", "nightly: {$warnings} warning(s)", $report,
    $importance, "");
if ($warnings > 0) { exit 1; }
15 / 18

Every morning at six: a systemd timer

# /etc/systemd/system/homelab-report.service
[Service]
Type=oneshot
ExecStart=/usr/bin/jennifer run /opt/homelab/nightly.j
EnvironmentFile=/etc/homelab-report.env
DynamicUser=yes

# /etc/systemd/system/homelab-report.timer
[Timer]
OnCalendar=*-*-* 06:00:00
Persistent=true
16 / 18

Testing without a lab

jennifer run fake.j 28771 &
PVE_URL=http://127.0.0.1:28771 DOCKER_URL=tcp://127.0.0.1:28771 \
  ... jennifer run nightly.j
17 / 18

Take-aways and read more

Based on Jennifer 0.27.0, November 2026.

18 / 18