feat(monitoring): publish alerts to bitborg-alerts and the legacy topic #770

Sammanfogat
supernaut sammanfogade 2 incheckningar från feat/ntfy-dual-topic in i main 2026-10-17 21:29:52 +00:00
Ägare

Step 1 of #581: Alertmanager publishes to bitborg-alerts and, during the transition, also to the legacy topic.

Changes

  • ntfy_alert_topic is now bitborg-alerts. New ntfy_alert_legacy_topic holds the legacy topic. Set it to "" to stop publishing there.
  • alertmanager.yml.j2 renders one ntfy webhook per non-empty topic, from a single loop. Token auth applies to both.
  • Runbook: grant and subscribe to bitborg-alerts, plus the transition steps. On a fresh host, set the legacy topic empty before the first apply.
  • scripts/test-alert-rules.py asserts the topic list with the legacy topic set and empty, and that every hook gets credentials_file when a token is set.

Operator steps, in order

  1. On the monitoring host, grant the new topic: podman exec -it ntfy ntfy access alertmanager bitborg-alerts write-only. Do this before the apply, or the new webhook gets 403 and AlertmanagerDeliveryFailing fires.
  2. Apply the monitoring role.
  3. Resubscribe each device to bitborg-alerts. Expect duplicates until step 5.
  4. Send a test alert and confirm every device gets it. Unsubscribe from the legacy topic.
  5. Set ntfy_alert_legacy_topic: "", apply, and send a second test alert.

Refs #581

Step 1 of #581: Alertmanager publishes to `bitborg-alerts` and, during the transition, also to the legacy topic. ## Changes - `ntfy_alert_topic` is now `bitborg-alerts`. New `ntfy_alert_legacy_topic` holds the legacy topic. Set it to `""` to stop publishing there. - `alertmanager.yml.j2` renders one ntfy webhook per non-empty topic, from a single loop. Token auth applies to both. - Runbook: grant and subscribe to `bitborg-alerts`, plus the transition steps. On a fresh host, set the legacy topic empty before the first apply. - `scripts/test-alert-rules.py` asserts the topic list with the legacy topic set and empty, and that every hook gets `credentials_file` when a token is set. ## Operator steps, in order 1. On the monitoring host, grant the new topic: `podman exec -it ntfy ntfy access alertmanager bitborg-alerts write-only`. Do this before the apply, or the new webhook gets 403 and `AlertmanagerDeliveryFailing` fires. 2. Apply the monitoring role. 3. Resubscribe each device to `bitborg-alerts`. Expect duplicates until step 5. 4. Send a test alert and confirm every device gets it. Unsubscribe from the legacy topic. 5. Set `ntfy_alert_legacy_topic: ""`, apply, and send a second test alert. Refs #581
supernaut lade till 2 incheckningar 2026-10-17 21:26:17 +00:00
supernaut schemalade den här ändringsförfrågan för automatisk sammanfogning när alla kontroller lyckas 2026-10-17 21:27:40 +00:00
supernaut sammanfogade incheckning 720af729d1 till main 2026-10-17 21:29:52 +00:00
supernaut tog bort grenen feat/ntfy-dual-topic 2026-10-17 21:29:52 +00:00
Logga in för att delta i denna konversation.
Inga granskare
Ingen milstolpe
Inget projekt
Inga tilldelade
1 deltagare
Notiser
Förfallodatum
Förfallodatumet är ogiltigt eller utanför gränserna. Använd formatet "åååå-mm-dd".

Inget förfallodatum satt.

Beroenden

Inga beroenden satta

Referens
bitborg/bitborg-infra!770
Ingen beskrivning angiven.