Skip to content
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ documents for different readers.
at all. Every pinned digest is also scanned weekly for fixable HIGH and
CRITICAL CVEs, and each image with findings has an open issue until a scan
finds it clean.
- **Documented decisions and runbooks.** 130 ADRs covering what was chosen
- **Documented decisions and runbooks.** 131 ADRs covering what was chosen
and what was rejected — including the costs accepted knowingly; 55
runbooks for the operations that are easy to get wrong at 1am, one of which
is the handover page a successor reads first. Every critical alert links to
Expand Down Expand Up @@ -236,7 +236,7 @@ inbound passes may still reach it. Data flow and the maintained Mermaid topology
│ ├── architecture.md network.md hardware.md
│ ├── observability.md security.md roadmap.md changelog.md
│ ├── diagrams/ # the network diagram (SVG) and its predecessors
│ ├── adr/ # 130 ADRs — architecture decision records
│ ├── adr/ # 131 ADRs — architecture decision records
│ ├── exercises/ # purple-team exercise records — see its README
│ └── runbooks/ # 55 runbooks; successor-handover.md is the front door
└── Makefile # make help
Expand Down
120 changes: 120 additions & 0 deletions docs/adr/0130-give-alertmanager-its-own-dns-fallback.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
# ADR-0130: Give Alertmanager its own DNS fallback

**Status:** Accepted · 2026-11

## Context

[ADR-0055](0055-forward-to-adguard-alone.md) makes AdGuard on `trinity` the
only forwarder behind Unbound on `morpheus`, and accepts what follows: while
AdGuard is down, nothing in the house resolves an outside name. It makes that
failure loud, with `AdGuardNotAnswering` at critical, and short.

The page that announces the failure needs DNS to leave the house. Alertmanager
on `prometheus` resolves through Docker's embedded resolver, which forwards to
`morpheus`. Its receivers are:

- **the in-house ntfy,** `ntfy.matrix.elysium`, which runs on `trinity`. Its
name is a host override that `morpheus` answers itself, without AdGuard;
- **ntfy.sh,** the second copy of every urgent and security page;
- **healthchecks.io,** `hc-ping.com`, the heartbeat that pages when
Alertmanager goes quiet.

Today, the cases are:

| What is down | In-house ntfy | ntfy.sh copy | Heartbeat | What you hear |
| --- | --- | --- | --- | --- |
| AdGuard alone | Arrives | Fails to resolve | Fails to resolve | The in-house page, then healthchecks.io calling Alertmanager dead |
| All of `trinity` | Host down | Fails to resolve | Fails to resolve | Only healthchecks.io calling Alertmanager dead |

The usual cause is the second row: `trinity` rebooting, off, or waiting at its
passphrase prompt. Then the only page names the wrong machine. It happened
on 2026-11-13, when every host was rebooted at once. Alertmanager logged
`lookup hc-ping.com … server misbehaving` from 18:21 to 18:23 while `trinity`
came up, and `AlertmanagerNotificationsFailing` fired. The audit of
`prometheus` that day recorded it as finding 4.

ADR-0055 rules out the obvious fix. A public forwarder beside AdGuard on
`morpheus` let a third of the house's lookups through unfiltered, and pfSense
cannot express `forward-first`. So a fallback has to cover the alert path
alone.

Three things were measured on `prometheus` on 2026-11-23 (Docker 29.9.1):

- **VLAN 99 already reaches public resolvers.** `1.1.1.1` and `9.9.9.9`
answered `hc-ping.com` over UDP and TCP. blackbox-exporter's `8.8.8.8:53`
probe ([`security.md`](../security.md)) uses the same path. Nothing in
ADR-0129 closes it.
- **`morpheus` answers `SERVFAIL` when it cannot forward.** A name AdGuard
blocks gets the same answer, which is why the test below could use one
without taking AdGuard down. ADR-0055 explains the `SERVFAIL`.
- **Docker's embedded resolver tries the next server on `SERVFAIL`, in
order.** A scratch container on a user-defined network, as Alertmanager is,
was given `--dns 10.0.99.1 --dns 1.1.1.1`. It resolved `doubleclick.net` to
a real address from `1.1.1.1` after `morpheus` returned `SERVFAIL`. It
still resolved `ntfy.matrix.elysium` to `10.0.99.40` from `morpheus`. With
`morpheus` alone, `doubleclick.net` did not resolve.

## Decision

**Alertmanager gets its own resolver list: `morpheus` first, then two public
resolvers from different operators.** In
[`stacks/observability/compose.yaml`](../../stacks/observability/compose.yaml):

```yaml
dns:
- 10.0.99.1
- 1.1.1.1
- 9.9.9.9
```

`morpheus` stays first, so every name it can answer comes from it. That
includes the `matrix.elysium` overrides, which no public resolver knows. A
public resolver is asked only when `morpheus` fails, and then only for
Alertmanager's own lookups: its three receiver hosts.

The house's DNS does not change. ADR-0055 stands for every client, and
filtering is not weakened anywhere a person browses.

## Alternatives considered

- **A public forwarder on `morpheus`.** Declined: it is ADR-0010's fallback,
which ADR-0055 measured leaking a third of the house's lookups past the
filter.
- **Pin the receivers' addresses** with `extra_hosts`. Declined. ntfy.sh and
healthchecks.io sit behind addresses their operators change without
notice, and a stale pin fails silently on the path that must not.
- **Add the fallback to the host,** in systemd-resolved. Declined: Docker
takes its upstreams from the host, so every process and container on
`prometheus` would get the fallback. That is more than the alert path
needs.
- **Accept it.** The failure is loud, not silent. Declined, because what is
loud is wrong: the page blames Alertmanager for an outage on `trinity`, at
the moment the right page matters most.

## Consequences

- **With `trinity` down, the urgent pages reach ntfy.sh.** That covers
`AdGuardNotAnswering`, and `trinity`'s `InstanceDown` once it is due. The
heartbeat keeps pinging, so healthchecks.io no longer calls Alertmanager
dead for a problem on another host. The in-house copy still cannot arrive
while `trinity` is down, because it runs there.
- **Alertmanager's lookups bypass AdGuard while `morpheus` cannot answer.**
They are three hostnames, all of them notification services, so nothing is
lost by not filtering them. The query leaves the house only in that window.
- **An internal name reaches a public resolver if Unbound fails while
`morpheus` keeps routing.** The `matrix.elysium` overrides are Unbound's,
so a stopped or wedged Unbound fails them along with every outside name.
Docker then asks `1.1.1.1` and `9.9.9.9` for `ntfy.matrix.elysium`. They
answer `NXDOMAIN`, and the in-house copy fails as it would have anyway, but
the name has left the house. That is accepted: the name is already
published in this repository, and the query carries nothing else. A whole
`morpheus` outage leaks nothing, because then there is no route out either.
- **The fallback depends on Docker's resolver behaviour,** measured on 29.9.1.
After the change is deployed, `nslookup doubleclick.net` inside the
`alertmanager` container proves it in place: it answers only if the
fallback works, because `morpheus` returns `SERVFAIL` for that name.
- **Reopen if:**
- ADR-0055 is reopened by `forward-first` or a second AdGuard, which would
make `morpheus` itself fail over;
- VLAN 99 loses its path to public resolvers;
- Docker changes how its embedded resolver treats `SERVFAIL`.
14 changes: 14 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,18 @@ docstring gives: it is a record, not a claim about now.

## 2026-11-23

- **Alertmanager has its own DNS fallback
([ADR-0130](adr/0130-give-alertmanager-its-own-dns-fallback.md)).** With
AdGuard on `trinity` as `morpheus`'s only forwarder (ADR-0055), a `trinity`
outage left the ntfy.sh copy of every urgent page, and the healthchecks.io
heartbeat, unable to resolve. The only page was healthchecks.io calling
Alertmanager dead. That happened on 2026-11-13, and the audit of
`prometheus` recorded it as finding 4. Alertmanager's compose service now
lists `10.0.99.1`, `1.1.1.1` and `9.9.9.9`. A scratch container measured
that Docker's embedded resolver moves to the next server when `morpheus`
answers `SERVFAIL`, and still takes the `matrix.elysium` overrides from
`morpheus`. The house's DNS is unchanged.

- **The firewall no longer passes Hicks to `mjolnir`'s card on HTTP, and its
firmware was found behind.** The last two items of the 2026-11-13 audit
that needed no visit to the card. *Allow HTTP to Mjolnir*, a pass on Hicks
Expand All @@ -29,6 +41,7 @@ docstring gives: it is a record, not a claim about now.
Winterfell remain above the block. The firmware was read against APC's site:
the card's AOS 2.0.0.6 against 3.6.1.2, and the UPS's 09.8 against 15.0;
`hardware.md` records both. Updating them is left to the operator.

- **`neo`'s remaining audit findings, applied.** From the 2026-11-13 audit:
the switch's own input filter and its `ssh`, `winbox` and `www-ssl`
services, and the admin user's address, are narrowed from all of
Expand All @@ -38,6 +51,7 @@ docstring gives: it is a record, not a claim about now.
unused ports are disabled. Applied under a five-minute automatic revert,
cancelled once SSH, the SNMP scrape and a fresh TLS 1.2 handshake from
`trinity` were proven. device-mode, which needs a button press, is not done.

- **#922 closed: the 2000/250 plan stays, and the WAN moves off `em0`
through `neo`'s SFP+ cages at 2.5G
([ADR-0131](adr/0131-carry-the-wan-through-neos-sfp-cages-at-2-5g.md)).**
Expand Down
6 changes: 5 additions & 1 deletion docs/observability.md
Original file line number Diff line number Diff line change
Expand Up @@ -788,7 +788,11 @@ separately, so either half can fail without taking the other with it. If the
in-house ntfy is the thing that has failed, the page still goes out:
`EndpointUnreachable` (from the `http_2xx_tier_ca` probe of
`ntfy.matrix.elysium`) and `AlertmanagerNotificationsFailing` are both
critical, so both reach `urgent` and its ntfy.sh copy. The runbook has the
critical, so both reach `urgent` and its ntfy.sh copy. That holds while
`trinity`, and the AdGuard on it, is down too: Alertmanager falls back to
public resolvers when `morpheus` cannot answer
([ADR-0130](adr/0130-give-alertmanager-its-own-dns-fallback.md)), so the
ntfy.sh copy and the heartbeat still resolve. The runbook has the
table and the cutover:
[`verify-the-alert-path.md`](runbooks/verify-the-alert-path.md#where-the-real-alerts-go).

Expand Down
6 changes: 5 additions & 1 deletion docs/runbooks/forward-dns-to-adguard.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,11 @@ done; echo "blocked=$b leaked=$l"

Since [ADR-0055](../adr/0055-forward-to-adguard-alone.md) there is no fallback
to prove. What this proves is that the page reaches you, and about how long
the house is without outside names before it does. **Do not silence
the house is without outside names before it does. Both copies of the page
should arrive, the in-house ntfy and ntfy.sh. The ntfy.sh copy resolves
through Alertmanager's own fallback
([ADR-0130](../adr/0130-give-alertmanager-its-own-dns-fallback.md)), not
through the house's DNS. **Do not silence
`AdGuardNotAnswering` for this**: the page is the result. Pick a moment
nobody in the house needs the internet for about ten minutes.

Expand Down
10 changes: 10 additions & 0 deletions stacks/observability/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,16 @@ services:
- no-new-privileges:true
# No tmpfs needed; see prometheus above for how that was established.
read_only: true
# ADR-0130. morpheus first, so the matrix.elysium overrides (the in-house
# ntfy) still answer from it. The public two are asked only when morpheus
# fails: Docker's embedded resolver moves to the next server on SERVFAIL,
# which is what morpheus answers while AdGuard on trinity is down
# (ADR-0055). Without them, the ntfy.sh copy and the heartbeat cannot
# resolve during the outage they should be reporting.
dns:
- 10.0.99.1
- 1.1.1.1
- 9.9.9.9
command:
- --config.file=/etc/alertmanager/alertmanager.yaml
- --storage.path=/alertmanager
Expand Down