Skip to content

AB2D-7352 Add ECS Instance Status Alerts - #1832

Open
smirnovaae wants to merge 14 commits into
mainfrom
Ab2D-7352/ECS_alerts
Open

AB2D-7352 Add ECS Instance Status Alerts#1832
smirnovaae wants to merge 14 commits into
mainfrom
Ab2D-7352/ECS_alerts

Conversation

@smirnovaae

Copy link
Copy Markdown
Contributor

🎫 Ticket

https://jira.cms.gov/browse/AB2D-7352

🛠 Changes

Added ECS alerts

ℹ️ Context

If an ECS task, service, or instance starts failing silently, we do not currently have a reliable alerting mechanism to notify the team. This creates a risk that failures could go unnoticed until someone checks logs manually or a downstream issue is reported.

🧪 Validation

@smirnovaae
smirnovaae requested a review from a team as a code owner August 5, 2026 19:29

@Sadibhatla Sadibhatla 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.

@smirnovaae , Looks like one of the checks failed . Could you please check .
cc : @gfreeman-navapbc

@bennavapbc

Copy link
Copy Markdown
Collaborator

Do we want a separate Slack channel for dev/test/sandbox? I'd hate to add more noise to our current alerts channel

@Sadibhatla

Copy link
Copy Markdown
Contributor

Do we want a separate Slack channel for dev/test/sandbox? I'd hate to add more noise to our current alerts channel

Yes, Grant was referring to it too .. Will need to get a ticket created for it.
@BharathL95

Copilot AI 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.

Pull request overview

Adds CloudWatch/EventBridge-based alerting for ECS task/service failures so silent ECS issues surface in the shared ab2d-<env>-cloudwatch-alarms SNS → Slack pipeline.

Changes:

  • Introduces EventBridge rules + CloudWatch Logs metric filters/alarms for ECS task stops, deployment failures, running-below-desired, and scheduled task failures.
  • Centralizes API ALB health alarm notifications onto the shared CloudWatch alarms SNS topic (removing the per-service SNS topic/subscriptions).
  • Adjusts 10-core alarm publishing/subscription wiring for the shared alarms topic.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
ops/services/60-monitors/ecs.tf Adds EventBridge capture + log metric filters + CloudWatch alarms for ECS failure/health conditions.
ops/services/60-monitors/data.tf Adds ECS cluster/service lookups and a log resource policy for EventBridge → CloudWatch Logs delivery.
ops/services/30-api/main.tf Removes per-service SNS topic/subscription and routes API “healthy host” alarm to shared alarms topic.
ops/services/30-api/cloudwatch.tf Removes Splunk email subscription tied to the API CloudWatch alarms topic.
ops/services/10-core/main.tf Updates alarm action wiring and the alarms-topic Slack subscription endpoint reference.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread ops/services/10-core/main.tf Outdated
Comment thread ops/services/30-api/main.tf Outdated
Sadibhatla and others added 6 commits August 10, 2026 18:27
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@smirnovaae

Copy link
Copy Markdown
Contributor Author

@smirnovaae , Looks like one of the checks failed . Could you please check . cc : @gfreeman-navapbc

Now all checks passed

@smirnovaae

Copy link
Copy Markdown
Contributor Author

Do we want a separate Slack channel for dev/test/sandbox? I'd hate to add more noise to our current alerts channel

I added filter when only prod sends alert to slack
this might be temporary until we have a separate Slack channel

@mianava mianava 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.

Are any of these already covered by Datadog ECS alerts?

@smirnovaae

Copy link
Copy Markdown
Contributor Author

Are any of these already covered by Datadog ECS alerts?

Datadog only defines two ECS monitors, both utilization-based: CPU High and Memory High. No overlap with anything here.

@smirnovaae
smirnovaae requested a review from mianava September 4, 2026 17:24
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.

5 participants