feat(n8n): keep the alert hub working after the Nexus fleet rebuild - #8
Draft
theonlygeranium wants to merge 1 commit into
Draft
feat(n8n): keep the alert hub working after the Nexus fleet rebuild#8theonlygeranium wants to merge 1 commit into
theonlygeranium wants to merge 1 commit into
Conversation
The n8n Alert Aggregation Hub was built against the pre-Nexus Discord fleet. After the fleet rebuild, health.alert events stayed on Redis and Health Guardian still posted Discord webhooks directly, so the hub went quiet even though the workflow itself was healthy. Add alert_dispatcher + a Nexus payload mapper, wire tango-healthcheck and scheduler, and accept Nexus severity aliases in the workflow JSON. Impact: tango-healthcheck.timer, Discord scheduler, n8n tango-alert workflow Requires restart: yes — next healthcheck timer run picks up the script; Discord bots need a restart to load scheduler.py Verification: pytest tests/test_alert_dispatcher.py; POST /webhook/tango-alert returns 200 Co-authored-by: theonlygeranium <theonlygeranium@users.noreply.github.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
The n8n Alert Aggregation Hub was added before the Nexus Fleet Model rebuild. The workflow itself is still healthy (
POST /webhook/tango-alertreturns 200), but the new architecture stopped feeding it:health.alerton Redis Streams and only logged locallyalert_dispatcher.pyexisted on Schubert with no callersDISCORD_WEBHOOK_URLdirectlyThis PR reconnects both caller generations to the same hub schema.
What changed
scripts/alert_dispatcher.pywithsend_nexus_health_alert()(mapswarning/error/healthyonto n8n severities)scripts/nexus_n8n_bridge.pyfor FleetBot_handle_health_alertVerification
pytest tests/test_alert_dispatcher.py— 5 passedseverity=WARNfromnexus:voss→ HTTP 200Alert processedseverity=warningis still rejected by the deployed validate node; the mapper (or importing the updated workflow JSON) is requiredSchubert follow-up
Live
/opt/Project-Tangois ahead of GitHubmain(Nexussrc/). The mapper and FleetBot hook were also applied on Schubert so the hub works before this PR merges. Discord bots still need a restart to loadscheduler.py. Health Guardian picks up on the next timer run.Do not restart Caddy, Cloudflared, Postgres, Tailscale, or Ollama.
Impact:
tango-healthcheck.timer, Discord scheduler, n8n tango-alert workflowRequires restart: next healthcheck timer run; Discord bots to load
scheduler.py