Skip to content

feat(monitoring): opt-in warning/critical SNS topics with critical-tier alarms - #12

Merged
parthvj1014 merged 2 commits into
masterfrom
feat/severity-alert-topics
Nov 18, 2026
Merged

parthvj1014 merged 2 commits into
masterfrom
feat/severity-alert-topics

Conversation

@parthvj1014

@parthvj1014 parthvj1014 commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

What changed

  • New opt-in prop severityAlerts on PostgresRDSCluster (passed through to RDSMonitoring). When it's set:
    • Two SNS topics are created: <clusterName>-warning and <clusterName>-critical. Both names can be overridden.
    • Every existing alarm sends to the warning topic.
    • New critical-tier alarms send to the critical topic:
      • free storage ≤ 5 GiB (primary and replicas)
      • freeable memory ≤ 500 MiB (primary and replicas)
      • replica lag > 5 min (replicas only)
      • connections, only when dbConnections is set in the critical thresholds
    • Both alarm and OK (recovery) notifications are sent, so Slack shows when an alert clears.
    • The topics are exposed as warningSnsTopic and criticalSnsTopic, for SlackChatbotIntegration.
  • Critical thresholds are configurable through primaryCriticalThresholds and replicaCriticalThresholds.
  • API.md was regenerated.

Why

  • In sc-infra-cdk-rds-melange, the prod RDS alarms (ai, endurance) have no actions, so they never notify anyone.
  • We want warnings in #infra-production-metrics and criticals in both #production-critical-alerts and #infra-production-metrics, through AWS Chatbot. That needs separate topics per severity.
  • This is the follow-up to the RDS hygiene ticket: ClickUp 14zhza6y1zp.

No impact on existing stacks

  • Publishing alone changes nothing. Every consumer pins an exact version: melange 0.0.8, rds-postgres (comms) 0.0.7, sentry-postgres 0.0.2.
  • Bumping without severityAlerts also changes nothing. I synthesized four representative configs on master and on this branch, and all 8 templates, including the nested monitoring stacks, are byte-identical:
    • melange-style: snapshot restore, replica, no webhooks
    • comms-style: webhooks, snsTopicCreate, custom thresholds, Multi-AZ, replica
    • sentry-style: webhooks, no replica
    • enableAlerts: false
  • Opting in only adds resources. It adds topics, the critical alarms, and actions on the existing alarms. Existing alarm names and logical IDs are unchanged, so nothing is replaced.
  • With alertSubcriptionWebhooks as well, the legacy single topic is still created and still gets every existing alarm, as before.
  • enableAlerts: false still disables everything.
  • projen build passes.

Notes (existing behaviour, not changed here, for compatibility)

  • The existing replication-lag alarm compares ReplicaLag, which is in seconds, against 30000, so it only fires after about 8 hours of lag. The new critical lag alarm uses seconds correctly.
  • network-throughput and backup-storage alarms never receive data on any of our stacks.

🤖 Generated with Claude Code

parthvj1014 and others added 2 commits November 18, 2026 10:57
…er alarms

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@parthvj1014
parthvj1014 merged commit 8393e2d into master Nov 18, 2026
5 checks passed
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.

2 participants