【发布时间】:2021-03-14 15:05:58
【问题描述】:
我知道如何使用 AWS CDK 创建警报,但我不知道如何向该警报添加通知。我该怎么做?
这是我的闹钟代码:
/**
* Alarm for CPU above 75%
*/
const metric = cluster.metricCPUUtilization();
new cloudwatch.Alarm(this, `CPU above 75% alarm` , {
metric: metric,
threshold: 75,
evaluationPeriods: 3,
datapointsToAlarm: 2,
});
这是它在控制台中的样子:
【问题讨论】:
标签: typescript amazon-cloudwatch aws-cdk