Skip to content

fix(alerts): subscribe alert templates to create and update events - #513

Merged
ChiragAgg5k merged 2 commits into
mainfrom
docs/alert-crud-events
Nov 26, 2026
Merged

ChiragAgg5k merged 2 commits into
mainfrom
docs/alert-crud-events

Conversation

@ChiragAgg5k

@ChiragAgg5k ChiragAgg5k commented Nov 26, 2026 •

Copy link
Copy Markdown
Member

Alert events now follow the CRUD naming (appwrite/appwrite#16119).

Before After
monitors.*.alerts.*.firing monitors.*.alerts.*.create
.resolved, .acknowledged, .unacknowledged monitors.*.alerts.*.update

An acknowledged alert keeps status: firing, so alerts-to-chat and uptime-incident-log now act on a create event or an update whose status is resolved, and ignore acknowledgements:

const opened = req.headers['x-appwrite-event']?.endsWith('.create');
if (!alert?.monitorId || !(opened || alert.status === 'resolved')) {

pause-on-usage-spike only subscribes to create; its README changes.

Part of: appwrite-labs/cloud#6564

Alert events follow the CRUD pattern now: create when an alert opens, update when it is acknowledged, unacknowledged or resolved. An acknowledgement keeps the alert firing, so the chat and incident templates act on a create or a resolved update and ignore the rest.
@appwrite

appwrite Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Code review

Commit Status Tier Verdict Details
a803e11 Reviewed Reviewed 🟢 S · Ready to merge ✅ Approved View review

The alert templates now use CRUD-style alert event names: the chat and uptime incident handlers process alert creation and resolution updates, while the usage-spike template subscribes only to creates. The Rust starter lockfile also updates url and form_urlencoded to patched versions.

Latest changes: The latest commit updates the Rust starter's locked url and form_urlencoded versions, including the fix for the url nested-blob origin stack-overflow advisory.

Walkthrough (6)
File Change
node/alerts-to-chat/README.md Documents create and update event subscriptions for alerts.
node/alerts-to-chat/src/main.js Handles newly created and resolved alerts while ignoring other updates.
node/pause-on-usage-spike/README.md Documents the template's create-only alert subscription.
node/uptime-incident-log/README.md Documents create and update event subscriptions for alerts.
node/uptime-incident-log/src/main.js Logs created uptime alerts and resolved alerts, ignoring other updates.
rust/starter/Cargo.lock Updates url and form_urlencoded to patched versions.

Reviewed the commits since bae5efb

Tip

Comment @appwrite review to re-run, or mention @appwrite with a question.

@appwrite appwrite Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Tier S · Looks good to merge. Summary

@ChiragAgg5k
ChiragAgg5k merged commit 8037dec into main Nov 26, 2026
29 checks passed
@ChiragAgg5k
ChiragAgg5k deleted the docs/alert-crud-events branch November 26, 2026 09:21
@ChiragAgg5k ChiragAgg5k self-assigned this Nov 26, 2026
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.

1 participant