Repository navigation
feat(sensitive): alerts on the phone as a title and a line (#136) - #716
Merged
Merged
Conversation
Every rule's description is a paragraph written for a keyboard, and the
phones were getting it whole. On the ntfy.sh topics they got the raw
webhook JSON.
stacks/sensitive/ntfy/templates/homelab.yml renders each payload as:
- Title: a severity marker and the summary. A group shows the count
and the alert name.
- Message: the description's first sentence (at most 200 characters)
and the host, or one line per summary for a group.
- Priority: critical 5, warning 3, resolved and the rest 2.
Checked against six payload shapes on the pinned image under its
hardening, and against every rule's description: four are trimmed, and
those with none show severity and category rather than ntfy's
"triggered".
The in-house URLs move to ?template=homelab. The ntfy.sh copies take
?template=alertmanager, the built-in, since ntfy.sh cannot load ours.
Both are SOPS values on prometheus, so this needs a secrets edit there.
Refs #136
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Sep 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
A custom ntfy template,
stacks/sensitive/ntfy/templates/homelab.yml, mounted at ntfy's defaulttemplate-dir. Alertmanager payloads render like this, measured on the pinned image:Priority follows severity:
Why
Every rule's
descriptionis a paragraph written for a keyboard, and the phones received it whole. The ntfy.sh copies received the raw webhook JSON.Blast radius
trinity: one new read-only directory mount into
sensitive-ntfy.make up STACK=sensitiverecreates the container.prometheus: secrets edit needed. Nothing changes on the phones until it's done.
ALERTMANAGER_*_WEBHOOK_URLvalues change?template=alertmanagerto?template=homelab.*_EXTERNAL_URLvalues gain?template=alertmanager. ntfy.sh can't load our template, and the built-in beats raw JSON.url_fileis read at notify time, so this takes effect on the next notification with no restart.If the template ever fails to render, ntfy rejects that publish.
AlertmanagerNotificationsFailingthen fires through the ntfy.sh copy.No change to network segmentation or firewall rules
No new port published to a VLAN that could not already reach the service
No credential added outside
secrets/*.sops.yamlVerification
Payload shapes: six rendered through
ntfy:v2.28.0with the template mounted read-only and all capabilities dropped: critical, warning, resolved, a group of three, Watchdog, and one with no annotations. The output is above.Real rules: the first-sentence rule was checked against all 102 alerting rules' descriptions. Four run past 200 characters and are trimmed with an ellipsis. Those with no description show
severity · categoryinstead of ntfy's filler text, "triggered".Checks:
make validatepasses, and yamllint is clean.make validatepassesDeployed to the lab and confirmed working: after merge,
make up STACK=sensitiveon trinity and the URL edit on prometheus, then step 8's synthetic page shows it on the phonesDocs updated: stack README, secrets template,
alertmanager.yamlcomment, runbookRefs #136
🤖 Generated with Claude Code