monitoring: readable ntfy notifications #395
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!395
Loading…
Reference in a new issue
No description provided.
Delete branch "monitoring/ntfy-readability"
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
ntfy notifications are hard to read: the title is
[FIRING:1] Alertnameand the body is every label and annotation of every alert in the group. For cAdvisor-fed alerts that is 21container_label_com_docker_compose_*labels on top of the useful ones.Fix
Two commits, independent:
--store_container_labels=falseplus a whitelist of the three compose labels the cadvisor dashboard reads (project,service,project.working_dir). A container series goes from 27 labels to 6. Nothing else in the repo queries acontainer_label_*.template-pathpointing at a trackedbody.tmpl(Gotext/template, no extra functions): per alert, thesummaryannotation, thendescriptionif set. Every rule already has a summary. Plain text, no markdown, since the Android app's markdown rendering is undocumented. The title is built by the bridge and cannot be templated.Docs: Monitoring.md (template, label whitelist), Services.md row.
Verification
just recreate ntfy-alertmanager-configre-rendered the config;grep -c template-pathin the running bridge's config gives 1.just up monitoringrecreated cadvisor and ntfy-alertmanager, both healthy./metricsforname="jellyfin": labels are nowcontainer_label_com_docker_compose_project,..._service,..._project_working_dir,id,image,name.amtool alert add alertname=NotificationTemplateTest severity=warning category=containerswith a summary and description annotation, 4-minute end: Alertmanager's webhook counter went 5 → 6 with every_failed_totalreason at 0, ntfy'smessages_publishedadvanced, and the bridge logged no template error. Rendered body confirmed in the Android app: two lines, summary then description, no label list.🤖 Generated with Claude Code