monitoring: drop the ntfy bridge, template in ntfy #396
No reviewers
Labels
No labels
audit-work
bug
docs
general-admin
major-upgrade
needs-vps-sync
new-service
on-hold
outside-work
post-podman
renovate
upstream
vps
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
mysticalsoap/docker!396
Loading…
Reference in a new issue
No description provided.
Delete branch "monitoring/drop-ntfy-bridge"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The ntfy-alertmanager bridge builds the notification title in code (
[FIRING:n] Alertname), so #395's body template was as far as readability could go. The bridge also cost a container, a config-renderer one-shot, a bridge-password secret and an envsubst template.Fix
Two commits.
monitoring/ntfy/templates/homelab.yml(template-dir, read on every request): title is the first alert'ssummary, prefixed 🚨 (critical) or ⚠️ (warning) while firing and ✅ once resolved, body is thedescription(or summary-plus-description per alert when a group holds several), priority followsseverity. Alertmanager posts straight tohttp://ntfy:80/homelab-<topic>?template=homelab, one receiver per topic chosen by the existingcategoryroutes, with the ntfy token as a Bearercredentials_file. Removed: both bridge services, thealertmanager_bridge_passwordsecret,config.scfg.template,body.tmpl, the backup include and the Secrets.md Pattern 2 exception. Tags can't be templated in ntfy, so none are set. Docs, README and topology regenerated.AlertmanagerNotifyFailing: a bad template now fails only as a 400 on delivery, and nothing had a metric for that.Verification
amtool check-config: 6 receivers, SUCCESS.promtool check config: 40 rules, SUCCESS.check-compose.shok for every stack.up -d --wait --remove-orphansremovedntfy-alertmanagerandntfy-alertmanager-config, recreatedntfy(template mount) andalertmanager(secret, depends_on); all healthy. ntfy sees/etc/ntfy/templates/homelab.yml. Prometheus restarted for the edited bind mounts;up{job="alertmanager"}is 1 and the new rule is loaded.amtool alert add: one critical single alert (category=containers) and a two-alert group (category=monitoring, so the fallback topic). Alertmanager's webhook counter went 0 → 2 with every_failed_totalreason at 0, ntfy'smessages_publishedadvanced, no errors in either log. A render failure would have been a 400 and aclientErrorfailure.homelab-containersshould show a critical "Test: direct ntfy template, critical" titled message with the description as body;homelab-alertsa "Group test alpha (2 alerts)" message listing both. Resolved copies follow with a ✅ title and priority 1.After merge, by hand:
rm monitoring/secrets/alertmanager_bridge_password.txt(the secret file is outside what I touch).🤖 Generated with Claude Code
7644a30700cb067575b0cb067575b02de8ba0340