Tôi đang sử dụng AWS CloudFormation cho đơn đăng ký của mình và đang cố thực hiện yêu cầu đếm báo thức qua mẫu tương ứng. Tôi có thể thực hiện thành công yêu cầu đếm báo thức trực tiếp cho số Elastic Load Balancer, nhưng trạng thái cảnh báo trong phạm vi Amazon CloudWatch là "không đủ dữ liệu", khi tôi cố gắng đạt được cùng thông qua mẫu CloudFormation.Tại sao báo thức đếm yêu cầu CloudWatch được tạo qua năng suất CloudFormation "Không đủ dữ liệu"?
My ELB JSON là:
"ElasticLoadBalancer": {
"Type": "AWS::ElasticLoadBalancing::LoadBalancer",
"Properties": {
"AvailabilityZones": {
"Fn::GetAZs": ""
},
"Listeners": [
{
"LoadBalancerPort": "80",
"InstancePort": {
"Ref": "WebServerPort"
},
"Protocol": "HTTP"
}
],
"HealthCheck": {
"Target": {
"Fn::Join": [
"",
[
"HTTP:",
{
"Ref": "WebServerPort"
},
"/"
]
]
},
"HealthyThreshold": "3",
"UnhealthyThreshold": "5",
"Interval": "30",
"Timeout": "5"
}
}
},
báo động của tôi JSON là:
"StatisticAlarmLow": {
"Type": "AWS::CloudWatch::Alarm",
"Properties": {
"AlarmDescription": "Alarm if there are too many unhealthy hosts.",
"MetricName": "RequestCount",
"Namespace": "AWS/ELB",
"Statistic": "Sum",
"Period": "60",
"EvaluationPeriods": "2",
"ComparisonOperator": "LessThanThreshold",
"Threshold": "1500",
"AlarmActions": [
{
"Ref": "WebServerScaleUpPolicy"
}
],
"Unit": "Count",
"Dimensions": [
{
"Name": "AutoScalingGroupName",
"Value": {
"Ref": "WebServerGroup"
}
}
]
}
},
"StatisticAlarmHigh": {
"Type": "AWS::CloudWatch::Alarm",
"Properties": {
"AlarmDescription": "Alarm if there are too many unhealthy hosts.",
"MetricName": "RequestCount",
"Namespace": "AWS/ELB",
"Statistic": "Sum",
"Period": "60",
"EvaluationPeriods": "2",
"ComparisonOperator": "GreaterThanThreshold",
"Threshold": "4000",
"AlarmActions": [
{
"Ref": "WebServerScaleUpPolicy"
}
],
"Unit": "Count",
"Dimensions": [
{
"Name": "AutoScalingGroupName",
"Value": {
"Ref": "WebServerGroup"
}
}
]
}
},
Từ trên nó tạo ra các báo động với "đủ dữ liệu" như một trạng thái. Ai có thể cho tôi biết điều gì có thể là lý do? Và nếu có bất kỳ mẫu/ví dụ mẫu có sẵn để sử dụng yêu cầu đếm báo động trên ELB, nó sẽ được đánh giá cao.
Cảm ơn bạn, Steffen Opel. Tôi đã thay đổi kích thước và nó hoạt động. –