我正在尝试创建一个 Cloud Formation 模板,其中包含基于特定负载均衡器的特定指标的 Cloud Watch 警报。我的问题是如何为每个警报指定负载均衡器?我很确定您必须在某处指定 ARN,但我不确定如何引用不同堆栈中的负载均衡器的 ARN 或在哪里引用它们。我对 AWS 服务还很陌生,所以任何帮助都会很感激。谢谢!
"500ErrorAlarmEast": {
"Type" : "AWS::CloudWatch::Alarm",
"Properties" : {
"AlarmName" : "500ErrorAlarm",
"ComparisonOperator" : "GreaterThanOrEqualToThreshold",
"EvaluationPeriods" : 1,
"MetricName" : "HTTPCode_ELB_500_Count",
"Namespace" : { "Ref": "AlarmNamespace" },
"Period" : 300,
"Statistic" : "Sum",
"Threshold" : 5,
"AlarmDescription" : "Unusually high level of internal 500 ALB East errors.",
"AlarmActions" : [ { "Ref": "SnsTopic" } ],
"TreatMissingData" : "notBreaching",
"InsufficientDataActions" : []
}
}
答案1
传递维度参数“Dimensions”:[{“Name”:“LoadBalancer”,“Value”:{“Ref”:“WebAppALBId”} }],