Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ documents for different readers.
can't run an agent (firewall, switch, UPS, iLO). One agent config, deployed
identically everywhere. [How](docs/architecture.md#observability-data-flow)
- **Dashboards and alerting as code.** 8 provisioned dashboards, 156 panels, and
211 alert rules — 183 metric-based in Prometheus, 28 log-based in Loki — sharing
215 alert rules — 187 metric-based in Prometheus, 28 log-based in Loki — sharing
one Alertmanager routing tree. No dashboard exists only in a database.
- **Secrets encrypted in-repo with SOPS + age.** Per-device credentials,
decrypted at deploy time into gitignored paths, with `git log` showing which
Expand Down Expand Up @@ -207,7 +207,7 @@ inbound passes may still reach it. Data flow and the maintained Mermaid topology
.
├── stacks/
│ ├── observability/ # the estate's stack on prometheus — ten services
│ │ ├── prometheus/ # config, file_sd targets, 183 alert rules
│ │ ├── prometheus/ # config, file_sd targets, 187 alert rules
│ │ ├── alertmanager/ # routing and inhibition
│ │ ├── loki/ # single-binary config + 28 LogQL rules
│ │ ├── alloy/ # the agent config directory, shipped to every host
Expand Down
30 changes: 30 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,36 @@ docstring gives: it is a record, not a claim about now.

## 2026-11-24

- **A re-check of `heimdall` found its bootloader never updates, and nothing
watching it.** It was read-only, from the Mac on Hicks, after the
2026-11-23 audit's fixes. All twelve findings held on the Pi: only 22 and
9100 listened, sudo asked for the password, the seed files were gone,
Chromium ran under `lwrespawn`, and the journal kept four boots, each with
its cause. Two things a new audit would still find:
- **The bootloader stayed at June 2025.** The `rpi-eeprom` package went
to 28.38 unattended at 06:09, carrying October 2026's bootloader.
`rpi-eeprom-update.service` runs with `-s` at boot, and writes only when
the chip is older than Raspberry Pi's floor for critical fixes. The 09:10
boot logged "Skipping automatic bootloader upgrade". `build-heimdall.md`
§2 said the nightly reboot made upgraded firmware run, which was true of
the boot partition's firmware and not of the bootloader.
`build-heimdall.md` §2 now drops the `-s` with a drop-in, so each boot
writes the newest default release.
- **No rule read what `heimdall` exports.** `InstanceDown` leaves it out
by design, and the nightly `HostRebooted` is `info`, which is never sent.
`apt_upgrades_pending`, `node_systemd_unit_state` and the SoC's
temperature reached Prometheus and stopped there. Four warnings now read
them, selected by `role="display"`: `DisplayUpdatesStalled`,
`DisplayUnitFailed`, `DisplayHot` and `DisplayDown`. None pages. The
`node.yaml` comment that the scrape was for the throttle state is
corrected: `node_exporter` does not report it.
- **What the VNC purge left.** Five libraries were autoremovable, and
`rpi-connect-lite` was removed but not purged. §2 now purges it, runs
`apt autoremove --purge`, and sets unattended-upgrades to remove unused
dependencies from then on.
- The new §2 steps need the operator's password at the Pi, so they are
written here and not yet applied.

- **The hourly converge flaps `ScheduledJobFailed` when the deployment
checkout is left on a branch, and `converge-the-host.md` now says so.**
`prometheus`'s `robo` tree is both the host's deployment checkout and the
Expand Down
17 changes: 9 additions & 8 deletions docs/observability.md
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ separates a quiet stream from a stopped one.

## Alerting

211 rules in total: 183 metric-based in `prometheus/rules/`, and 28 log-based in
215 rules in total: 187 metric-based in `prometheus/rules/`, and 28 log-based in
`loki/rules/`.

### Log-based (Loki ruler)
Expand All @@ -376,10 +376,11 @@ below, for any result but `oom-kill`, from PID 1's own stream. It fires when a
system unit fails at least twice in 48 hours. A single failure is not enough,
because most single failures are shutdown noise, which a log rule cannot tell
apart. `homelab-*` units are left to `ScheduledJobFailed`. It exists because
only `heimdall` exports `node_systemd_unit_state`, and nothing alerts on that
series anyway. On the hosts that ship their journal, a failing unit was seen by
nothing: `logrotate` failed nightly on `prometheus` and `oracle` from
2026-10-16 until the 2026-11-23 re-audit found it.
only `heimdall` exports `node_systemd_unit_state`, and `heimdall` ships no
journal, so its failed units are `DisplayUnitFailed`'s, in Prometheus. On the
hosts that ship their journal, a failing unit was seen by nothing:
`logrotate` failed nightly on `prometheus` and `oracle` from 2026-10-16 until
the 2026-11-23 re-audit found it.

`loki/rules/nut.rules.yaml` watches the UPS shutdown path, which the card's
SNMP cannot see. Every `upsmon` but `smaug`'s is already in Loki: `morpheus`'s
Expand Down Expand Up @@ -550,11 +551,11 @@ argument and for what to do when it exits 1.

### Metric-based (Prometheus)

183 rules across 13 files in `prometheus/rules/`:
187 rules across 13 files in `prometheus/rules/`:

| File | Covers |
| --- | --- |
| `host.rules.yaml` | Instance down, predictive disk fill, memory, load, clock skew and a clock with no time source at all — `HostClockUnsynchronised` reads `node_timex_sync_status`, because the offset reads zero once timesyncd has restored a clock that is wrong but stable, which is how a cleared RTC wrote fourteen minutes of samples three hours in the past and nothing noticed ([#519](https://github.com/Gerrrt/HomeLab/issues/519)) — reboots, whether a CPU has held within ten degrees of its own critical temperature for ten minutes (`HostCpuHot`, after the audit of `prometheus` of 2026-11-13 found the laptop peaking at 92 °C with nothing watching it), and, for the two laptops, whether the shelf is on mains, whether the cell that carries them through a cut is still worth relying on ([#454](https://github.com/Gerrrt/HomeLab/issues/454), and [`runbooks/replace-the-laptop-cell.md`](runbooks/replace-the-laptop-cell.md) for the swap), how hot that cell is, whether its temperature is being measured at all — on 2026-09-19 it was not, on either host — and how many minutes the host has left once the cut arrives ([#532](https://github.com/Gerrrt/HomeLab/issues/532)); whether the wiki's drift check on `oracle` is still running, and still able to read its claims ([#470](https://github.com/Gerrrt/HomeLab/issues/470), [#1531](https://github.com/Gerrrt/HomeLab/issues/1531)); and, for the NAS, whether every ZFS pool is online — `ZpoolNotOnline` reads `node_zfs_zpool_state`, added after `erebor` lost a disk on 2026-09-19 with the exporter hung ahead of it and `InstanceDown` the only page ([#558](https://github.com/Gerrrt/HomeLab/issues/558), [`runbooks/replace-the-nas-disk.md`](runbooks/replace-the-nas-disk.md)); and whether any drive's unsafe-shutdown count has grown in a day — `SmartDriveUnsafeShutdownsGrowing`, whose page says when `smaug` recorded a clean power-off the same day, because mains removed after a clean shutdown ticks the S3520 and a clean shutdown alone does not ([#746](https://github.com/Gerrrt/HomeLab/issues/746)), the measure of a cut the shutdown sequence [ADR-0049](adr/0049-shut-down-on-the-ups-from-a-nut-server-on-the-firewall.md) decides did not catch, the rule [ADR-0047](adr/0047-collect-smaug-smart-through-a-root-cron-and-the-textfile-collector.md) left to that issue when it carried `smaug`'s counter under the scrape ([#574](https://github.com/Gerrrt/HomeLab/issues/574)); and, for `Saruman`, how full its LVM-thin pools are — which `node_filesystem_*` cannot see — and whether its Proxmox firewall is still on with an inbound policy that drops, from two agent collectors ([#538](https://github.com/Gerrrt/HomeLab/issues/538), [#576](https://github.com/Gerrrt/HomeLab/issues/576)); and whether the `tc` mirror that feeds Zeek on `fenrir` is still delivering packets from every port of the lab bridge — `ZeekMirrorInactive`, Zeek's absence detection answered on the hypervisor because the lab's Loki has no ruler ([#437](https://github.com/Gerrrt/HomeLab/issues/437), [ADR-0068](adr/0068-mirror-the-lab-bridge-to-zeek-with-tc-not-open-vswitch.md)); and whether a guest the hypervisor tags `disposable` has outlived the fortnight it was built for — `DisposableGuestOutlived`, read from each guest's own `qm config` rather than from any list of which guests should exist, which is also why `HypervisorGuestStopped` stays quiet for such a guest, with `GuestConfigUnreadable` covering the read itself failing ([#438](https://github.com/Gerrrt/HomeLab/issues/438), [ADR-0071](adr/0071-run-disposable-investigations-on-a-guest-that-is-destroyed.md)); and a guest tagged `backup` that no enabled backup job selects, as `GuestNotInBackupJob`, after the domain's six fell out of `golem-nightly` through purged tofu destroys (2026-10-10); and how many days the four management consoles' certificates have left — the pfSense GUI, the iLO, `Saruman`'s `:8006` and the TrueNAS UI, none of which the blackbox exporter can reach — `ManagementCertificateExpiringSoon` at 30 days and `ManagementCertificateExpiryImminent` at 7, read from a handshake made inside each console's own segment, with `ManagementCertificateUnchecked` for a console that would not answer and `CertExpiryStateStale` for a collector that stopped ([#857](https://github.com/Gerrrt/HomeLab/issues/857), [ADR-0084](adr/0084-read-management-certificate-expiry-from-inside-each-segment.md)) |
| `host.rules.yaml` | Instance down, predictive disk fill, memory, load, clock skew and a clock with no time source at all — `HostClockUnsynchronised` reads `node_timex_sync_status`, because the offset reads zero once timesyncd has restored a clock that is wrong but stable, which is how a cleared RTC wrote fourteen minutes of samples three hours in the past and nothing noticed ([#519](https://github.com/Gerrrt/HomeLab/issues/519)) — reboots, whether a CPU has held within ten degrees of its own critical temperature for ten minutes (`HostCpuHot`, after the audit of `prometheus` of 2026-11-13 found the laptop peaking at 92 °C with nothing watching it), and, for the two laptops, whether the shelf is on mains, whether the cell that carries them through a cut is still worth relying on ([#454](https://github.com/Gerrrt/HomeLab/issues/454), and [`runbooks/replace-the-laptop-cell.md`](runbooks/replace-the-laptop-cell.md) for the swap), how hot that cell is, whether its temperature is being measured at all — on 2026-09-19 it was not, on either host — and how many minutes the host has left once the cut arrives ([#532](https://github.com/Gerrrt/HomeLab/issues/532)); whether the wiki's drift check on `oracle` is still running, and still able to read its claims ([#470](https://github.com/Gerrrt/HomeLab/issues/470), [#1531](https://github.com/Gerrrt/HomeLab/issues/1531)); and, for the NAS, whether every ZFS pool is online — `ZpoolNotOnline` reads `node_zfs_zpool_state`, added after `erebor` lost a disk on 2026-09-19 with the exporter hung ahead of it and `InstanceDown` the only page ([#558](https://github.com/Gerrrt/HomeLab/issues/558), [`runbooks/replace-the-nas-disk.md`](runbooks/replace-the-nas-disk.md)); and whether any drive's unsafe-shutdown count has grown in a day — `SmartDriveUnsafeShutdownsGrowing`, whose page says when `smaug` recorded a clean power-off the same day, because mains removed after a clean shutdown ticks the S3520 and a clean shutdown alone does not ([#746](https://github.com/Gerrrt/HomeLab/issues/746)), the measure of a cut the shutdown sequence [ADR-0049](adr/0049-shut-down-on-the-ups-from-a-nut-server-on-the-firewall.md) decides did not catch, the rule [ADR-0047](adr/0047-collect-smaug-smart-through-a-root-cron-and-the-textfile-collector.md) left to that issue when it carried `smaug`'s counter under the scrape ([#574](https://github.com/Gerrrt/HomeLab/issues/574)); and, for `Saruman`, how full its LVM-thin pools are — which `node_filesystem_*` cannot see — and whether its Proxmox firewall is still on with an inbound policy that drops, from two agent collectors ([#538](https://github.com/Gerrrt/HomeLab/issues/538), [#576](https://github.com/Gerrrt/HomeLab/issues/576)); and whether the `tc` mirror that feeds Zeek on `fenrir` is still delivering packets from every port of the lab bridge — `ZeekMirrorInactive`, Zeek's absence detection answered on the hypervisor because the lab's Loki has no ruler ([#437](https://github.com/Gerrrt/HomeLab/issues/437), [ADR-0068](adr/0068-mirror-the-lab-bridge-to-zeek-with-tc-not-open-vswitch.md)); and whether a guest the hypervisor tags `disposable` has outlived the fortnight it was built for — `DisposableGuestOutlived`, read from each guest's own `qm config` rather than from any list of which guests should exist, which is also why `HypervisorGuestStopped` stays quiet for such a guest, with `GuestConfigUnreadable` covering the read itself failing ([#438](https://github.com/Gerrrt/HomeLab/issues/438), [ADR-0071](adr/0071-run-disposable-investigations-on-a-guest-that-is-destroyed.md)); and a guest tagged `backup` that no enabled backup job selects, as `GuestNotInBackupJob`, after the domain's six fell out of `golem-nightly` through purged tofu destroys (2026-10-10); and how many days the four management consoles' certificates have left — the pfSense GUI, the iLO, `Saruman`'s `:8006` and the TrueNAS UI, none of which the blackbox exporter can reach — `ManagementCertificateExpiringSoon` at 30 days and `ManagementCertificateExpiryImminent` at 7, read from a handshake made inside each console's own segment, with `ManagementCertificateUnchecked` for a console that would not answer and `CertExpiryStateStale` for a collector that stopped ([#857](https://github.com/Gerrrt/HomeLab/issues/857), [ADR-0084](adr/0084-read-management-certificate-expiry-from-inside-each-segment.md)); and, for the office wall display, which its `role: display` keeps out of `InstanceDown`, four warnings that never page: upgrades from one origin pending for three days, a failed unit, the SoC above 75 °C, and two hours unscraped (`DisplayUpdatesStalled`, `DisplayUnitFailed`, `DisplayHot`, `DisplayDown`, [ADR-0119](adr/0119-put-the-office-wall-dashboard-on-a-pi-5-on-hicks.md)) |
| `network.rules.yaml` | SNMP reachability, pf not running, state table, switch links, a switch port whose VLAN changed (`SwitchPortVlanChanged`, from `dot1qPvid`, [#1387](https://github.com/Gerrrt/HomeLab/issues/1387)), iLO hardware and Smart Array cache. `shiva`'s Smart Storage Battery read failed from 2026-08-18 until it was replaced on 2026-09-02, with the array in write-through as a result, so stored metrics before that date show the failed pack — `IloBatteryCondition` names the spare part to order, and the controller rollups are deliberately read at *failed* rather than *degraded* ([#76](https://github.com/Gerrrt/HomeLab/issues/76)). Also whether the remote path's dynamic DNS name still resolves to the WAN address — `DdnsRecordStale` and `DdnsRecordUnchecked`, from the comparison `scripts/collect-gateway-state.sh` makes on the firewall every fifteen minutes ([#604](https://github.com/Gerrrt/HomeLab/issues/604), [ADR-0044](adr/0044-answer-the-endpoint-with-dynamic-dns-from-morpheus.md)); see *What the dynamic DNS series disclose* below |
| `ups.rules.yaml` | On battery, low battery, runtime, load, temperature, and whether the shutdown order has time to run: `UpsLowBatteryDurationShort` when the card's low-battery duration is under the 16 minutes [ADR-0107](adr/0107-subscribe-trinity-to-the-ups-and-bound-saruman-s-guest-stop.md) needs, `UpsRideThroughShort` when a charged pack on mains would start the halt under 15 minutes into a cut. Five rules read the AP9335T rack-ambient probe on the card: `UpsTemperatureProbeMissing`, `UpsTemperatureProbeCommsLost`, `RackAmbientTemperatureAlarm` on the card's own limits, and the fixed ones, `RackAmbientTemperatureHigh` over 30 °C and `RackAmbientTemperatureCritical` over 35 °C. The card reports whole degrees, not the tenths PowerNet-MIB describes. A pack was fitted on 2026-08-28 and passed its self-test, so these read real hardware; stored metrics older than that date are the card's fabricated values — see [`runbooks/fit-the-ups-battery.md`](runbooks/fit-the-ups-battery.md) |
| `containers.rules.yaml` | Restart loops, OOM kills, memory, throttling |
Expand Down Expand Up @@ -587,7 +588,7 @@ as loaded and healthy and could not fire for any input ([#63](https://github.com
`prometheus/tests/*.test.yaml` holds `promtool test rules` unit tests, which
feed a rule synthetic series and assert it fires — paired with a case asserting
it stays quiet, because a test that only ever expects silence would have passed
against the broken rule too. Coverage is 183 rules of 183 so far ([#843](https://github.com/Gerrrt/HomeLab/issues/843)) — all twelve
against the broken rule too. Coverage is 187 rules of 187 so far ([#843](https://github.com/Gerrrt/HomeLab/issues/843)) — all twelve
in `blackbox.rules.yaml`, all three in `dns.rules.yaml`, all seven in `range.rules.yaml`, `GatewayFilesystemCritical`, `ContainerHighMemory`,
`ContainerNearMemoryLimit`, `ContainerRestartLoop`, `ContainerCpuThrottled`,
the three container-state rules from
Expand Down
Loading