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
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,17 @@ gateway-state: ## Collect the firewall's view of its uplinks, DDNS record and GU
@# it needs no new timer; a failure fails the job like any other.
./scripts/collect-cert-expiry.sh --ssh $(FW_USER)@$(FW_HOST) --host morpheus \
--probe pfsense-ui=morpheus=127.0.0.1:443
@#
@# And the two syslog TLS leaves (#1049): the listener's, off its handshake
@# here, and morpheus's client leaf, from the copy the listener pins. Both
@# were issued for 825 days; the day either lapses, morpheus's logs stop.
./scripts/collect-cert-expiry.sh --host syslog-tls \
--probe syslog-listener=prometheus=10.0.99.20:6514 \
--file syslog-client=morpheus=certificates/morpheus.matrix.elysium.pem
@#
@# And whether NUT on the firewall can read the UPS, asked the way a
@# secondary asks (#1656's eight days): NutUpsUnreadable reads it.
./scripts/collect-nut-state.sh --ssh $(FW_USER)@$(FW_HOST) --host morpheus

.PHONY: silence-state
silence-state: ## Collect Alertmanager's silences as metrics (#575)
Expand Down
6 changes: 3 additions & 3 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
189 alert rules — 164 metric-based in Prometheus, 25 log-based in Loki — sharing
192 alert rules — 166 metric-based in Prometheus, 26 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,9 +207,9 @@ 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, 164 alert rules
│ │ ├── prometheus/ # config, file_sd targets, 166 alert rules
│ │ ├── alertmanager/ # routing and inhibition
│ │ ├── loki/ # single-binary config + 25 LogQL rules
│ │ ├── loki/ # single-binary config + 26 LogQL rules
│ │ ├── alloy/ # the agent config directory, shipped to every host
│ │ ├── snmp-exporter/ # generator.yaml is the source of truth
│ │ └── grafana/ # provisioning + 8 dashboards
Expand Down
38 changes: 38 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,44 @@ docstring gives: it is a record, not a claim about now.
[`shut-down-on-the-ups.md`](runbooks/shut-down-on-the-ups.md) §0.2 had sent
the operator to *Configuration → UPS → General*, which does not have it.
§3.8 and §6.5 send you back to 0.2, so the one fix corrects all three.
- **`morpheus` audited, read-only, on 2026-11-13, and re-read on 2026-11-23.**
Segmentation held: `make check-firewall` passed, NAT had one `rdr`, and the
VLANs, Hicks' passes, the resolver and Suricata matched the repository. Two
findings were worse than anything else, and
[#1503](https://github.com/Gerrrt/HomeLab/pull/1503) carries them: every
segment reached the admin UI and `sshd` on the firewall's WAN address, and
`sshd` accepted passwords. On 2026-11-23 both were still so on the box. The
rest, as they stood on 2026-11-23:
- **Fixed here.** `network.md` now declares the undeclared Hicks SSH pass
into `smaug` (the count is ten), the eighth Skids reservation at `.24`,
and the thirteen reservations `morpheus` pins in its ARP table.
`hardware.md` no longer says nothing collects pfSense's release:
`check_versions.py` does, from SNMP.
- **Alerts added.** NUT on `morpheus` marked the UPS's data stale 1,363
times in the fortnight to 2026-11-23, never for more than 5.2 seconds and
never more than 12 times in a sliding hour. `NutUpsDataStaleFrequent`,
added to #1673's `loki/rules/nut.rules.yaml`, warns when an hour has more
than 24; a spell that lasts is that file's `NutCommunicationsLost`.
`NutUpsUnreadable` asks `upsc` on the firewall every 15 minutes from
`make gateway-state` (`scripts/collect-nut-state.sh`) and pages at 30
minutes, which needs no log line at all: Loki holds no `upsmon` or `upsd`
line from `morpheus` for 2026-11-06, the middle of the driver outage. The
cause of the stale gaps is not found. The two syslog TLS
leaves, due 2029-01-09, had no expiry alert. `make gateway-state` now
reads them, morpheus's client leaf from the pinned file through a new
`--file` in `collect-cert-expiry.sh`, and
`SyslogTlsCertificateExpiringSoon` warns at 30 days.
- **Done elsewhere.** `trinity` subscribes to NUT
([#1596](https://github.com/Gerrrt/HomeLab/pull/1596)). The `netstat`
left running on `em0` since 2026-11-07 is gone.
- **Left for the operator, on the box.** The dead *Allow SSH from Mac to
WSL* rule, whose two ends are both on Hicks, is still loaded. The 41
pending package updates are still pending; the base system is current.
The GUI still serves pfSense's default self-signed certificate, due
2027-04-16 and watched by `ManagementCertificateExpiringSoon`. A root
console session is still open on `ttyv0`. Two Hicks leases with no row
in `network.md`, one with an Amazon prefix, had expired by 2026-11-23,
so they were not identified. The NVMe read 61 °C, against 64 on the 13th.

- **The SSD wear fix of 2026-11-13 did not fix it.** This corrects that day's
entry for the `prometheus` audit, which said a raw value outside 0–100 now
Expand Down
12 changes: 8 additions & 4 deletions docs/hardware.md
Original file line number Diff line number Diff line change
Expand Up @@ -308,10 +308,14 @@ hardware depends on —
recorded as a USB NIC in four documents until 2026-09-09, when the box was
read directly: `pciconf` shows it on a PCIe root port, and the only USB device
is the Wi-Fi module's Bluetooth half. The table records the release line
only, as [`check_docs.py`](../scripts/check_docs.py) requires, and unlike the
Linux hosts nothing collects the running release from pfSense — so it is
written here with its date: **pfSense CE 2.9.0-RELEASE**, build
`20260817-1836`, from `/etc/version` on 2026-09-09. Restoring the config
only, as [`check_docs.py`](../scripts/check_docs.py) requires. The running
release is collected, but not into this table: the SNMP scrape carries
pfSense's `sysDescr`, and [`check_versions.py`](../scripts/check_versions.py)
compares it every Wednesday with the one prose claim of it, in
[`enable-suricata.md`](runbooks/enable-suricata.md). The build is not
collected, so it is written here with its date: **pfSense CE 2.9.0-RELEASE**,
build `20260817-1836`, from `/etc/version` on 2026-09-09 and the same on
2026-11-23. Restoring the config
needs a release at least that new
([`restore-the-firewall.md`](runbooks/restore-the-firewall.md) §3).

Expand Down
35 changes: 29 additions & 6 deletions docs/network.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,20 @@ truth for what a box actually does.
[`swap-the-switch.md`](runbooks/swap-the-switch.md) does.
- NTP comes from `10.7.7.1`. The default `admin` user is disabled.
- DHCP disabled.
- **`morpheus` pins thirteen reservations in its ARP table, on every
segment but Skids and Degens.** Each is a Kea reservation with *Create a
static ARP table entry* set: `mjolnir`, `prometheus` and `oracle` on
Winterfell; `laptop-01`, `desktop-01`, `workstation-01`, `workstation-02`,
`laptop-02` and `desktop-02` on Hicks; `nibelheim`, `hyrule` and `mediatv`
on CasaBonita; and `shiva`'s iLO on ImaginationLAN. `arp -an` shows 21
permanent entries, these thirteen and the firewall's own eight interface
addresses. Read on 2026-11-23 for the audit of 2026-11-13. Only `mediatv`'s
has a recorded reason, the wake across the VLAN (CasaBonita, below). The
cost of the others: a host whose NIC or MAC changes keeps its address in
DHCP and is still unreachable through the firewall until the reservation's
MAC is edited, because the pinned entry never ages out. Check this list
first when a replaced or re-imaged machine answers on its own segment and
nowhere else.

> [!CAUTION]
> Do not re-enable DHCP on this interface. It races the DHCP servers on every
Expand Down Expand Up @@ -528,7 +542,13 @@ Televisions and consoles. Internet only.
[#485](https://github.com/Gerrrt/HomeLab/issues/485)). It was created on
2026-10-03 by [`build-the-backup-guest.md`](runbooks/build-the-backup-guest.md)
§4, directly above the same block. `golem` has mounted the share through
it, and `alexander` is refused.
it, and `alexander` is refused. **A tenth is in force, and no document
declared it until the audit of `morpheus` on 2026-11-13 found it:** an
SSH pass on Hicks' interface, `desktop-02` (`10.0.50.90`) →
`10.0.40.30:22`. It is host-scoped, so `make check-firewall`'s wholesale
question cannot see it, and no ADR or issue says why it was made. It is
listed here so this count is true. Removing it, or recording why it stays,
is the operator's decision.
- **One more from Hicks is specified and not yet created.**
`Allow 5800 to smaug`, Hicks → `10.0.40.30:5800`, is for MakeMKV's web GUI,
the disc ripper that runs on `smaug` only while someone is ripping
Expand Down Expand Up @@ -926,12 +946,13 @@ the least trusted.
on ADR-0099's three rows since 2026-10-21. The HomePod rows are in force
and reach the devices. Adding the HomePods in Home Assistant is a separate
matter, waiting on pyatv.
- **Seven addresses here are reserved, all below the `.100–.200` pool:**
- **Eight addresses here are reserved, all below the `.100–.200` pool:**
`bifrost` at `10.0.20.20` since 2026-09-28, the three eeros at
`.11`–`.13` since 2026-10-20
([#1228](https://github.com/Gerrrt/HomeLab/issues/1228)), and three
([#1228](https://github.com/Gerrrt/HomeLab/issues/1228)), three
HomePods at `.21`–`.23` since 2026-10-21
([#1226](https://github.com/Gerrrt/HomeLab/issues/1226)). Every other
([#1226](https://github.com/Gerrrt/HomeLab/issues/1226)), and the fourth
HomePod's reservation at `.24`, which the audit of 2026-11-13 found. Every other
device above sits inside the pool by lease, so its row is what it had when
it was read, not what it will have. The build proved why the rule's destination could not be one of
those: between 2026-09-09 and 2026-09-28 the bridge moved from `.104` to
Expand All @@ -941,8 +962,10 @@ the least trusted.
Assistant can control the HomePods (play, pause, volume, what's playing)
and not stream audio to them. Three are reserved at `.21`–`.23`, beside
`bifrost`, since 2026-10-21. They were reset and set up again that day,
and the fourth has not been set up again yet. `.24` is kept for it, and the
rows cover it already.
and the fourth is reserved at `.24`, which the rows cover already. It
held a lease there when `morpheus` was audited on 2026-11-13 and none on
2026-11-23, so whether it is set up again, and whether discovery from
`trinity` finds it, is not settled.
Traffic matching them is translated on its way out of the Skids interface,
from `10.0.99.40` to `10.0.20.1`, because the HomePods ignore mDNS queries
from another subnet. With that, discovery from `trinity` finds all three.
Expand Down
15 changes: 10 additions & 5 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

189 rules in total: 164 metric-based in `prometheus/rules/`, and 25 log-based in
192 rules in total: 166 metric-based in `prometheus/rules/`, and 26 log-based in
`loki/rules/`.

### Log-based (Loki ruler)
Expand Down Expand Up @@ -382,8 +382,13 @@ connected" ten times in three minutes, held for five, which is the driver on
`NutCommunicationsLost` (critical) fires on upsmon's own "is unavailable",
five minutes without UPS data on that host. `NutMonitorFailedToStart` catches
an `upsmon` that refused its configuration and exited. The brief *data stale*
spells, about a hundred a day and seconds long, are left alone, and so is
silence: an `upsmon` that is not running logs nothing.
spells, about a hundred a day and seconds long, are left alone, but
`NutUpsDataStaleFrequent` warns when an hour has more than 24 of them, twice
the worst hour measured to 2026-11-23. Silence is left alone too: an `upsmon`
that is not running logs nothing. That case, and `upsd` itself down, is
`NutUpsUnreadable`'s in `prometheus/rules/ups.rules.yaml`, which asks `upsc`
on the firewall every 15 minutes (`scripts/collect-nut-state.sh`) and needs no
log line.

**OOM kills have four owners** ([#903](https://github.com/Gerrrt/HomeLab/issues/903), [#1095](https://github.com/Gerrrt/HomeLab/issues/1095)):

Expand Down Expand Up @@ -535,7 +540,7 @@ argument and for what to do when it exits 1.

### Metric-based (Prometheus)

164 rules across twelve files in `prometheus/rules/`:
166 rules across twelve files in `prometheus/rules/`:

| File | Covers |
| --- | --- |
Expand Down Expand Up @@ -571,7 +576,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 164 rules of 164 so far ([#843](https://github.com/Gerrrt/HomeLab/issues/843)) — all twelve
against the broken rule too. Coverage is 166 rules of 166 so far ([#843](https://github.com/Gerrrt/HomeLab/issues/843)) — all twelve
in `blackbox.rules.yaml`, all three in `dns.rules.yaml`, `GatewayFilesystemCritical`, `ContainerHighMemory`,
`ContainerNearMemoryLimit`, `ContainerRestartLoop`, `ContainerCpuThrottled`,
the three container-state rules from
Expand Down
2 changes: 1 addition & 1 deletion docs/runbooks/deploy-stack.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ Then in the UI:
1. **Prometheus → Status → Targets.** Every job `UP`. The four `snmp` targets
take up to 45 seconds on their first scrape.
2. **Prometheus → Status → Rules.** Every rule loaded, none in error. The
page lists 170: the 164 alert rules this repository counts everywhere
page lists 172: the 166 alert rules this repository counts everywhere
else, plus the six recording rules:
`homelab_suricata_expected_interface`,
`homelab_battery_runtime_seconds`, and the two directions each of
Expand Down
9 changes: 9 additions & 0 deletions docs/runbooks/generate-certificates.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,15 @@ is within 15 minutes. For the others it is the next day, or sooner if the
collector is run by hand: `systemctl start homelab-cert-expiry` on Saruman, or
the cron job's **Run Now** on smaug.

The two syslog TLS leaves are read the same way, from the same job
([#1049](https://github.com/Gerrrt/HomeLab/issues/1049)): `syslog-listener` off
the handshake on `10.0.99.20:6514`, and `syslog-client`, `morpheus`'s client
leaf, from the copy the listener pins in `certificates/`, because a client
certificate has no handshake to read. Both are this CA's, 825 days, due
2029-01-09. They raise `SyslogTlsCertificateExpiringSoon` at 30 days, not the
console pair, and are reissued by
[`ship-firewall-logs.md`](ship-firewall-logs.md) §1 and §3.

A console whose certificate cannot be read raises
`ManagementCertificateUnchecked` after six hours rather than going silent. Run
the collector with `--print` to see which probe failed.
Expand Down
Loading