Skip to content

docs: notification delivery design (lists, Alarm Manager, Credentials, path into core) - #971

Merged
TheWitness merged 6 commits into
developfrom
docs/notification-delivery-design
Dec 5, 2026
Merged

TheWitness merged 6 commits into
developfrom
docs/notification-delivery-design

Conversation

@TheWitness

@TheWitness TheWitness commented Dec 5, 2026 •

Copy link
Copy Markdown
Member

Summary Adds docs/ with a design proposal for multi-channel notification delivery: keep thold's Notification Lists as the place that says who gets told, and use the Alarm Manager plugin for how (Slack, Teams, Telegram, SMS, PagerDuty, ServiceNow, webhooks, email), graph images and escalation. Documentation only; no behaviour changes. ## What the document covers - Responsibility split: - Thold owns the lists, their To/BCC and their assignment to thresholds, templates and devices, and produces the events. - Alarm Manager owns destinations, credentials, queues, rules, maintenance, acknowledgment and escalation. - Thold's current mail and command path stays as the fallback. - Email as a destination without changing what email-only users see: - a built-in "Cacti Mailer" destination; - recipients stay on the list's General tab. - Thold changes (T1-T7): - one thold_notify_dispatch() seam used by both the threshold path and the device path; - Alarm Manager's existing AlarmManagerProducerBridge::publish() / ::owns() and alarmmanager_device_bridge_decision() wired in, so nothing is sent twice; - proposed hooks alarmmanager_event_context, thold_notify_list_lookup and thold_alarm_acknowledged; - acknowledgment hooks in thold_threshold_ack() and its siblings; - what does not change. - Alarm Manager changes (A1-A7): - event contract v2 (lists, recipients, format file, graphs); - email parity (BCC, format files, inline <GRAPH>); - list routing table; - Destinations and Escalation tabs on thold's existing notify_list_tabs / notify_list_display hooks; - escalation policies, steps and timer; - graph upload per provider (Telegram sendPhoto, Slack two-step upload, Teams by URL); - acknowledgment hooks. - A hook/function table marking what exists versus what is proposed, plus security, compatibility/fallback, a four-phase delivery plan, testing and open questions. Also adds docs/index.php (the usual directory guard) and a "Design documents" section in README.md. Related: #718, #240, #118, #31, #873, Cacti/cacti#2840, Cacti/cacti#7781, Cacti/plugin_alarmmanager. ### Update: Credentials plugin (section 7) - Optional secret store: Alarm Manager destinations can reference a plugin_credentials credential, local or vault-backed, through credentials_get(). - Where the secret lives: this moves the encrypted secret from Alarm Manager's alarmmanager_key to the core secret_encryption_key or an external vault. The trade-offs are covered, including that core replicates its key to collectors while credentials rows are never replicated. - Requested Credentials plugin additions: secret_url and http_headers types, credentials_save(), and the credentials_types, credentials_in_use and credentials_changed hooks. - Alarm Manager upgrade path: additive schema change, opt-in --migrate-to-credentials with verification and rollback, export by name, backing up both keys, and collectors unchanged. - Thold: no change. ### Update: path into Cacti core (section 12) - Recommendation: don't merge the plugins into each other. Move Credentials, Alarm Manager (as core Alerts) and Notification Lists into develop (1.3) as separate subsystems. Alerts consumes Credentials and is built on the Symfony Notifier API already in develop (api_notification_send(), notification_channels hook, Cacti/cacti#7775). - SNMP credentials in core Credentials: - Phase S1: snmp_credential_id on devices, templates, automation and SNMP agent managers. Values are written into the existing columns, so spine and collectors need no change. - Phase S2: SNMP secrets encrypted at rest, with spine support and collector key handling. - Upgrade path following the 1.0.0 pattern (snmpagent, nectar, aggregate, autom8): - $plugins_integrated, then table adoption. Credentials tables keep their names and ciphertext; Notification Lists and Alarm Manager tables are renamed. - Alarm Manager secrets move into Credentials; anything that can't move is left disabled rather than failing the upgrade. - SNMP deduplication into named credentials. - Plugin APIs stay working, including a producer-bridge update shipped ahead of the core release. - Queue continuity, collectors, and 1.2.x maintenance. - Requirements to settle first (MariaDB-only SQL, the daemon, crypto format, realms, where-used checks), a proposed order on develop, and open questions. Includes a rebase onto TheWitness's manifest.json commit.

Update: review fixes and core PR list

  • Review fixes:
    • one dispatch per transition from every send site, before the To guard;
    • per-channel ownership, including committed-then-thrown and ownership_unknown;
    • details_html in contract v2;
    • graph GT_* preset plus resolved start/end;
    • list routing deduplicated per target;
    • acknowledgment resolved by alarm_key against the persisted stream.
  • New section 12.8: the Cacti core PRs this project builds on.
    • Merged on develop: #7190, #7775, #7782, #7791, #8074, #8174, plus the Reports-to-Notification-List commits.
    • Merged on 1.2.x: #8166, #8171, #8172.
    • Open against develop, to merge first or alongside: #7790 (queue API), #8726 (secret form fields), #9283 (lock component).
    • Also the plugin PRs the plugin-side design relies on.
  • Corrected the REST data query (RFC: REST Data Query subsystem for API-based collection (develop) cacti#7351) and ODBC (Support ODBC as a data input source cacti#7297) issue references.

… channels and escalation

Propose keeping Notification Lists as the "who" in thold and using the
Alarm Manager plugin for delivery, graph images and escalation. Describe
the thold and Alarm Manager changes, the existing and proposed plugin
hooks between them, fallback behaviour, phases and tests (#718, #240).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings December 5, 2026 12:43
…anager

Explain how destinations would reference a plugin_credentials credential
instead of holding their own ciphertext, how that moves the encrypted
secret from Alarm Manager's key to the core secret_encryption_key or an
external vault, the remote-collector gap, the additions needed in the
Credentials plugin, and the opt-in upgrade and rollback path for
plugin_alarmmanager.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The new docs/ directory is missing from manifest.json’s expected entries, causing CI manifest validation to fail and upgrades to report it as unexpected.

7 open issues
What changed in this PR

Adds a design proposal connecting Thold Notification Lists to Alarm Manager for multi-channel delivery, graph images and escalation. Notification behavior remains unchanged.

Changes:

  • Defines plugin responsibilities, proposed hooks, fallback behavior and a phased delivery plan.
  • Links the proposal from the README.
  • Adds a directory guard for docs/.
File Description
README.md Adds a Design documents section linking the proposal.
docs/​notification-delivery-design.md Describes notification integration, compatibility, security and testing.
docs/​index.php Redirects directory requests to the plugin index.

Review effort: Balanced

Comment thread docs/index.php Resolved
Comment thread docs/notification-delivery-design.md Resolved
Comment thread docs/notification-delivery-design.md Resolved
Comment thread docs/notification-delivery-design.md Resolved
Comment thread docs/notification-delivery-design.md Resolved
Comment thread docs/notification-delivery-design.md Resolved
Comment thread docs/notification-delivery-design.md Resolved
TheWitness and others added 2 commits December 5, 2026 07:57
tests/bin/validate-manifest.php fails CI on any top-level entry the manifest
does not account for.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… core

Recommend moving both plugins into develop as separate subsystems, with
Alerts consuming Credentials and built on the core Symfony Notifier API.
Fold SNMP credentials into core Credentials in two phases, and describe
the upgrade through $plugins_integrated, table adoption, the Alarm
Manager secret move, plugin API continuity, collectors and 1.2.x.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@TheWitness TheWitness changed the title docs: notification delivery design for lists, Alarm Manager, chat channels and escalation docs: notification delivery design (lists, Alarm Manager, Credentials, path into core) Dec 5, 2026
xmacan
xmacan previously approved these changes Dec 5, 2026
…ack; list core PRs

- Dispatch once per transition from every evaluator send site, before the
  To guard, so chat-only lists still notify.
- Follow the bridge's per-channel decision, including committed-then-thrown
  and ownership_unknown, so nothing is sent twice.
- Carry the rendered HTML body (details_html) in contract v2.
- Treat graph_timespan as a GT_* preset and send resolved start/end bounds.
- Deduplicate list deliveries per (event, destination, target), reusing the
  recipient key.
- Acknowledge by alarm_key and resolve the persisted stream, not a hash
  computed on the web node.
- Add section 12.8 listing the merged and open Cacti core pull requests this
  work builds on, and correct the REST (#7351) and ODBC (#7297) issue numbers.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
docs/index.php is a bare redirect like cli/index.php, so it is never loaded into the isolated unit process and cannot appear in Clover.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@sonarqubecloud

sonarqubecloud Bot commented Dec 5, 2026

Copy link
Copy Markdown

@TheWitness
TheWitness merged commit 5d49305 into develop Dec 5, 2026
7 checks passed
@TheWitness
TheWitness deleted the docs/notification-delivery-design branch December 5, 2026 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants