Add CloudWatch alarm coverage (MonitoringConstruct) #61

Closed
amoussa1229 wants to merge 3 commits from infra-cw-alarm-coverage into main
2 changed files with 9 additions and 3 deletions
Showing only changes of commit ea173a0966 - Show all commits

View file

@ -27,6 +27,10 @@ export class SocketModeConstruct extends Construct {
const cluster = new ecs.Cluster(this, 'Cluster', {
clusterName: 'seahaven-socket-mode',
vpc: props.vpc,
// Container Insights publishes ECS/ContainerInsights metrics (incl.
// RunningTaskCount) needed for the task-count alarm. This adds CloudWatch
// metric + log cost — see PR body "NEEDS ADAM SIGN-OFF (cost/config)".
containerInsightsV2: ecs.ContainerInsights.ENABLED,
});
this.cluster = cluster;

View file

@ -116,9 +116,11 @@ export class SeahavenSlackBotStack extends cdk.Stack {
httpApi: slackHandler.api,
ecsService: socketMode.service,
ecsCluster: socketMode.cluster,
// RunningTaskCount alarm requires Container Insights (cost/config change) —
// gated off by default; enabled in a separate, sign-off-gated commit.
enableRunningTaskAlarm: false,
// RunningTaskCount alarm requires Container Insights, enabled on the
// socket-mode cluster (see socket-mode.ts). This adds CloudWatch metric +
// log cost — flagged in the PR as "NEEDS ADAM SIGN-OFF (cost/config)".
// Drop this commit (and the cluster's containerInsightsV2 line) to decline.
enableRunningTaskAlarm: true,
});
// ── Stack outputs ─────────────────────────────────────────────────────────