Skip to content

epic: alerting system — notifications for network events, health changes, and anomalies #775

Closed as not planned

Description

@Kpa-clawbot

Summary

CoreScope sees everything — node health, topology changes, RF anomalies, clock drift — but operators have to manually check to notice problems. When a bridge node goes offline and the mesh splits at 2am, nobody knows until morning.

This epic adds a configurable alerting system that watches for meaningful events and notifies operators through their preferred channels.

Origin: Identified during the neighbor graph epic (#773) — "when a bridge node goes offline and the graph splits, I need a notification."


Alert Categories

Network Topology

Alert Trigger
Mesh split/merge Cluster count changed
Bridge node offline Articulation point went stale
New node appeared Previously unseen public key advertised
Node went offline No adverts for configurable threshold (default: 24h for repeaters)

RF Health

Alert Trigger
Noise floor spike Observer reports noise above threshold
Observer offline Observer stopped reporting to MQTT
SNR degradation Link SNR dropped below threshold
Packet loss Loss rate exceeded threshold on a path

Repeater Health

Alert Trigger
Clock skew Exceeded threshold (ref #690)
Battery voltage Dropping below configured level (ref #663)
Relay traffic zero Repeater forwarding nothing (ref #662)

Operational

Alert Trigger
Foreign adverts Unknown network adverts detected (ref #730)
Hash collision New prefix collision introduced
Coverage gap Observer stopped hearing a previously-covered repeater

Security

Alert Trigger
Unauthorized signatures Advert signature validation failure (ref #686)
Unexpected node Node appeared that doesn't match known network

Delivery Mechanisms

Channel Notes
Webhook POST to URL — works with Discord, Slack, IFTTT, custom integrations
Email SMTP configuration
In-app banner Notification area in CoreScope UI with alert history
MQTT publish Dedicated alerting topic on the MQTT bus
Log output Structured log lines for operators who monitor logs

Each alert rule maps to one or more delivery channels. Operators configure which alerts go where.


Design Considerations

  • Configurable thresholds per alert type (e.g., "stale after 12h" vs "stale after 48h")
  • Alert fatigue management — rate limiting, hysteresis (don't fire/resolve/fire/resolve), cooldown periods
  • Alert history — what fired, when, auto-resolved or still active, with a UI to browse past alerts
  • Silencing/snoozing — maintenance windows, temporary mute per alert or per node
  • Per-node overrides — "this repeater is solar and goes offline every winter night, don't alert on it"
  • Escalation — if an alert isn't acknowledged within X minutes, re-notify or escalate to a different channel

Milestones

M1: Alert Engine + In-App Notifications

Core alert evaluation loop in the Go backend. Runs on each ingest cycle. Starts with topology alerts (node offline, mesh split) since these require no new data — just existing advert aging and neighbor graph. In-app notification banner + alert history page.

Alerts: Node offline, mesh split/merge, bridge node offline, new node appeared.

M2: Webhook Delivery

Configurable webhook endpoints. JSON payload with alert type, affected node(s), timestamp, severity. Enables Discord/Slack integration immediately — highest operator demand.

M3: RF + Repeater Health Alerts

Noise floor, SNR degradation, observer offline, packet loss, clock skew, battery voltage, relay traffic zero. These require threshold configuration UI in the customizer.

M4: Alert Management UX

Silencing/snoozing UI, per-node overrides, maintenance windows, alert fatigue controls (hysteresis, cooldown). Escalation rules.

M5: Operational + Security Alerts

Foreign adverts, hash collisions, coverage gaps, unauthorized signatures, unexpected nodes. These are lower frequency but high value for security-conscious deployments.

M6: Email + MQTT Delivery

SMTP integration, MQTT alerting topic. These serve operators who don't use webhooks.


Non-Goals (for now)

  • SMS/phone call delivery (use webhook → Twilio/IFTTT bridge instead)
  • Auto-remediation (reboot nodes, etc.) — alerting only, not control
  • Third-party monitoring integration (Prometheus/Grafana export) — separate epic if needed

Related Issues

Activity

  1. Kpa-clawbot commented on Jun 17, 2026

    @Kpa-clawbot
    OwnerAuthor

    Severity: P2 — operator-visibility gap (no automated notifications on mesh events).

    Claim: confirmed scope. 6-milestone epic, multi-month, cross-cutting (backend engine, delivery, UI, config).

    Code today: no alert engine exists; thresholds scattered across aging.go, liveness.go. No notifications subsystem.

    Findings:

    • (doshi): LNO=L for operators running unattended deployments. Pre-mortem risk: alert fatigue kills adoption — M4 (silencing/hysteresis) must NOT be deferred past M2; ship webhook + silencing together or not at all.
    • (carmack): Alert evaluation on every ingest cycle (M1 design) needs careful budget. At 1K packets/sec, threshold checks must be O(1) per-alert-rule or this becomes the new hot-path bottleneck. Pre-aggregate state, do not rescan.

    Fix path: epic, no single fix path. Recommend split: M1+M2 (engine + webhook + silencing) as first PR series, decide on remaining milestones after operator feedback.

    Dup check: #730, #686, #690, #663, #662 referenced as related.

    Triage verdict: needs-operator-input (milestone prioritization + delivery channel ranking).

  2. efiten commented on Sep 13, 2026

    @efiten
    Collaborator

    There is no alert rule or webhook code on master, and the child issues this epic proposed were never filed.

    Closing as not planned during backlog triage (see #1922). Nobody has picked this up since it was filed and no PR ever referenced it. Closed issues stay searchable: if you want to build this, reopen it or open a fresh issue with the current state of the code.

  3. added
    priority: minorNice to fix — polish and consistency
    and removed on Sep 13, 2026
  4. efiten commented on Oct 8, 2026

    @efiten
    Collaborator

    For the record, the per-user mail part of this epic landed in #2140. A logged-in user watches nodes and gets one mail when a watched node goes offline, comes back or reports a low battery. Admins can add a new foreign node and an observer going offline. The detection is separate from delivery, so another channel such as a webhook can be added later.

    The topology, RF and anomaly alerts listed here (mesh split, SNR degradation, noise spikes, clock drift) are not built.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: cross-cuttingAffects multiple pages or global CSS/JSpriority: minorNice to fix — polish and consistencytype: epicParent issue that decomposes into sub-issues

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions