【发布时间】:2021-01-01 23:39:51
【问题描述】:
我正在尝试设置一个 cloudwatch 警报,如果超过 5000 个 http 请求被发送到使用 CloudFormation 的 AWS ES 集群,我看到我可以使用 ElasticsearchRequests 指标,这就是我到目前为止所拥有的:
ClusterElasticsearchRequestsTooHighAlarm:
Condition: HasAlertTopic
Type: 'AWS::CloudWatch::Alarm'
Properties:
AlarmActions:
- {'Fn::ImportValue': !Sub '${ParentAlertStack}-TopicARN'}
AlarmDescription: 'ElasticsearchRequests are too high.'
ComparisonOperator: GreaterThanThreshold
Dimensions:
- Name: ClientId
Value: !Ref 'AWS::AccountId'
- Name: DomainName
Value: !Ref ElasticsearchDomain
EvaluationPeriods: 1
MetricName: 'ElasticsearchRequests'
Namespace: 'AWS/ES'
OKActions:
- {'Fn::ImportValue': !Sub '${ParentAlertStack}-TopicARN'}
Period: 60
Statistic: Maximum
Threshold: 5000
这看起来正确吗?
我应该使用SampleCount 而不是Maximum 作为Statistic 吗?
非常感谢任何建议
【问题讨论】:
标签: amazon-cloudformation amazon-cloudwatch