Files
serverAppConfigs/serverAppConfigs-docs/Infrastructure/Alertmanager.md
T
Frank 93d1181fee docs: OKF v0.1 compliance pass + fact-check + 3 research briefs
- Migrate all 127 non-reserved docs to OKF v0.1 frontmatter (type/description/tags/timestamp); fix 13 YAML issues, 2 duplicate-FM blocks, strip reserved-page FM
- Restructure log.md to OKF (## YYYY-MM-DD, newest-first)
- Fact-check against scripts/AGENTS.md ground truth: fix 6 false 'Active' banners on retired runbooks, 96->114 GiB GTT, deployment.md vs deploy-plan.py/deploy-remote.sh, Deployment Flow frank-medium=Quadlet, Calibre 9.9.0->9.15.0 + CVE-2025-7404 conflation, Copyparty v1.20.24, RomM 5.3.0 breaking change
- Move *arr docs to new FrankBook-Pro/ section (git mv, link-safe)
- Write active runbook bodies from ground truth (frank-large, frank-small)
- Add 3 research briefs + HTML report: Local TTS and Voice Cloning, AI Job Search and Resume Tools, Most Popular Self-Hosted AI Apps (Jun-Sep 2026)
- Add upstream-version rows to ComfyUI/OpenWebUI/Hermes app docs
- All 336 tests pass; 136 pages, 0 unresolved wikilinks
2026-09-22 02:09:41 -07:00

5.5 KiB

type, description, tags, timestamp
type description tags timestamp
reference Alertmanager receives firing rules from Prometheus, groups and dedupes them, and forwards each group as a webhook to the host-side Signal relay — which sends it through...
infrastructure
2026-09-17

Alertmanager

Alertmanager receives firing rules from Prometheus, groups and dedupes them, and forwards each group as a webhook to the host-side Signal relay — which sends it through signal-cli to Frank's phone. It is the first delivery path in the observability stack (2026-09-17); before it, a firing alert was visible in Prometheus and on the Grafana dashboard's ALERTS panel and reached nobody.

Host: Dankclaw — Port: 9093 (loopback) — Docs: https://prometheus.io/docs/alerting/latest/alertmanager/

Facts

Item Value
Image docker.io/prom/alertmanager:latest
Published 127.0.0.1:9093 → 9093, loopback only (see Observability → Exposure)
Unit dankclaw/observability/quadlet/alertmanager.container → alertmanager.service
Config /opt/alertmanager/config/alertmanager.yml, installed from shared/prometheus/alertmanager.yml on every deploy
Data /opt/alertmanager/data (silences, notification log)
Health wget --spider -q http://localhost:9093/-/healthy
Receiver one signal receiver → webhook http://host.containers.internal:18093/alertmanager
Grouping group_by: [alertname], group_wait 30 s, group_interval 5 m, repeat_interval 4 h

Why the webhook address is host.containers.internal

The Signal relay is a host-side process, and the address it must bind is the one detail this design gets wrong twice (2026-09-17). From a bridge container, loopback is the container's own, and netavark DNATs published ports only — so a relay bound to 127.0.0.1 refused the first webhook with dial tcp 169.254.1.2:18093: connection refused. The obvious fix — bind host.containers.internal itself — fails too: on this host netavark runs its bridges in aardvark-dns' netns, so 169.254.1.2 is not a local address in the host's namespace (OSError: [Errno 99] Cannot assign requested address). What works: bind the host's LAN IP (192.168.0.143) — netavark delivers the container's 169.254.1.2 dial to that address (proven with a probe socket: container → 169.254.1.2:18094 → host socket bound to 192.168.0.143:18094, while the LAN IP refused from the container, the usual netavark quirk). Since that puts an unauthenticated endpoint on a host interface, the deployer installs an iptables INPUT set admitting 18093/tcp from loopback, the host itself (its own health probe) and the podman bridge subnet (10.89.0.0/16) only — the rest of the LAN gets a DROP.

The Signal relay

scripts/signal-relay.py is a systemd user unit (scripts/signal-relay.service), not a Quadlet: it runs python3 from the checkout, so a deploy reaches it with no copy step, and a hand-written user unit can be enabled (generated quadlet units cannot on this host). Linger is on for dank, so WantedBy=default.target is the whole boot story.

  • POST /alertmanager — the Alertmanager webhook handler; formats the group and sends it.
  • GET /health — liveness for the deployer's health wait.
  • Dedupes per group for 15 minutes, so a stuck alert cannot out-repeat the 4 h repeat_interval during a relay hiccup.
  • Sends through /usr/local/bin/signal-cli -a +12062476336 -o json send +12062476336 -m <text> — Frank's existing account (state dir 318311); the credential is the account state under ~/.local/share/signal-cli, and the account/phone are numbers, not secrets.

Deployment

./scripts/deploy.sh dankclaw --service alertmanager

deploy_observability installs the quadlet unit, copy_alertmanager_config installs the config, and install_signal_relay copies the user unit, installs the iptables rules, enables and restarts the relay, then waits on 192.168.0.143:18093/health before the container's own /-/healthy wait. The planner selects alertmanager for its quadlet file, shared/prometheus/alertmanager.yml, and the two relay files; prometheus ships the alerting: block that points at alertmanager:9093.

Gotchas

  • The webhook URL and the relay's listen port are a cross-file contract: the relay moves ports and the webhook string does not move with it, and every alert is then dropped with no error anywhere. tests/observability_quadlet.bats pins both halves.
  • The container address is alertmanager:9093, never the published port: Prometheus is in a container and the port is loopback-only.
  • signal-cli account state is on the host, not in the container — a wiped ~/.local/share/signal-cli silences delivery while every status page stays green.
  • signal-cli 0.14.7's -a flag parses an all-digit value as a phone number and never falls back to the accounts.json name: the account's numeric name (318311) dies with Invalid account (phone number), while -a +12062476336 works. The message goes via -m, not a positional — a positional message is parsed as a second recipient (Invalid phone number '…').
  • A failed send is not marked in the dedupe map, so the next Alertmanager repeat retries it — but the relay returns 200 to the webhook regardless (a relay bug must not 500 Alertmanager), so a dead signal-cli shows up only in the relay's journal, not in Alertmanager's.

See Also