feat(glyph): ntfy + Slack notification relay#442
Merged
Conversation
- Add ntfy-sh service (localhost:2586) as a unified notification bus
- Add ntfy-slack-relay systemd service that subscribes to the homelab
topic and forwards to Slack via chat.postMessage; sender identity
driven by NTFY_TITLE header so each service appears distinctly
- Migrate transmission torrent-done script from Pushover to ntfy POST
- Add slack-bot-token agenix secret; remove pushover-{app,user}-token
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ntfy subscribe takes the server as part of the topic URL, not a separate --url flag. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ntfy subscribe executes commands via sh internally, which is not in the service PATH. Replace with a direct curl subscription to the /topic/json SSE endpoint, parsing each event with jq and forwarding to Slack ourselves. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…tart Without pipefail, curl | while always exits 0 (the while loop's exit code), so systemd never restarts the relay on connection failure. With pipefail, a curl failure propagates as non-zero, triggering Restart=on-failure. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…fy tags Senders set a Tags header on their ntfy POST; the relay extracts the first tag and passes it as icon_emoji to chat.postMessage. Transmission uses :transmissionic:. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Tags were never parsed from the ntfy JSON event, so NTFY_TAGS was always empty and icon_emoji resolved to "::" causing a generic avatar. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

Summary
Replaces Pushover with a self-hosted ntfy notification bus that forwards to Slack via a bot, providing a unified messaging layer for all glyph services.
Infrastructure
127.0.0.1:2586as an internal pub/sub bus; services POST to it without touching Slack directlynotificationstopic via ntfy's HTTP JSON stream and forwards each message to#updatesviachat.postMessageset -o pipefailensures curl failures propagate as non-zero so systemd restarts the relay on connection lossTransmission integration
script-torrent-donenow POSTs to ntfy instead of PushoverTitle: TransmissionandTags: transmissionicheaders; the relay maps these to the Slackusernameandicon_emojifields respectivelypushover-app-token,pushover-user-token)Adding future services
Any service on glyph can send a Slack notification with:
Test plan
ntfy-shandntfy-slack-relayare bothactive (running)subscribers=1appears injournalctl -u ntfy-sh.servicecurl -H "Title: Test" -H "Tags: white_check_mark" -d "hello" http://127.0.0.1:2586/notifications#updateswith correct username and icon🤖 Generated with Claude Code