Enable Container Insights + RunningTaskCount alarm (NEEDS ADAM SIGN-OFF)
Enable Container Insights on the seahaven-socket-mode ECS cluster and add the seahaven-socket-mode-running-tasks alarm (fires when running tasks < 1 against desiredCount=1). RunningTaskCount is only published with Container Insights enabled, which adds CloudWatch metric + log-ingestion cost. This is isolated in its own commit so it can be dropped if the cost/config change is declined — revert this commit (cluster containerInsightsV2 + enableRunningTaskAlarm flag) and the rest of the alarm coverage is unaffected.
This commit is contained in:
parent
c28d5b1170
commit
ea173a0966
2 changed files with 9 additions and 3 deletions
|
|
@ -27,6 +27,10 @@ export class SocketModeConstruct extends Construct {
|
||||||
const cluster = new ecs.Cluster(this, 'Cluster', {
|
const cluster = new ecs.Cluster(this, 'Cluster', {
|
||||||
clusterName: 'seahaven-socket-mode',
|
clusterName: 'seahaven-socket-mode',
|
||||||
vpc: props.vpc,
|
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;
|
this.cluster = cluster;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -116,9 +116,11 @@ export class SeahavenSlackBotStack extends cdk.Stack {
|
||||||
httpApi: slackHandler.api,
|
httpApi: slackHandler.api,
|
||||||
ecsService: socketMode.service,
|
ecsService: socketMode.service,
|
||||||
ecsCluster: socketMode.cluster,
|
ecsCluster: socketMode.cluster,
|
||||||
// RunningTaskCount alarm requires Container Insights (cost/config change) —
|
// RunningTaskCount alarm requires Container Insights, enabled on the
|
||||||
// gated off by default; enabled in a separate, sign-off-gated commit.
|
// socket-mode cluster (see socket-mode.ts). This adds CloudWatch metric +
|
||||||
enableRunningTaskAlarm: false,
|
// 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 ─────────────────────────────────────────────────────────
|
// ── Stack outputs ─────────────────────────────────────────────────────────
|
||||||
|
|
|
||||||
Reference in a new issue