我創建了一個 ECS 集群,如下所示: this.cluster = new ecs.Cluster(this, 'Cluster', { containerInsights: true, vpc: ec2.Vpc.fromLookup(this, props.stage + 'Vpc', {isDefault: false}) });我想像這樣基于我的 cluser 創建一個 CW 警報: const CPUHigh = new cw.Alarm(this, "CPUHigh", { metric: this.cluster.metric("CPUUtilized"), threshold: 50, evaluationPeriods: 3, period: cdk.Duration.seconds(60), comparisonOperator: cw.ComparisonOperator.GREATER_THAN_THRESHOLD })但即使該指標與 Container Insights 創建的指標相匹配,它似乎也不能以這種方式引用。有誰知道它應該被引用的方式?
如何引用由 ECS/Fargate 的容器見解創建的 CloudWatch 指標
慕斯709654
2023-04-14 15:08:06