如何解决当ElasticsearchRequests太高时设置AWS CloudWatch警报
我正在尝试设置一个CloudWatch警报,如果使用CloudFormation将5000个HTTP请求发送到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
吗?
任何建议都值得赞赏
解决方法
根据有关监视ES集群的AWS文档,指标ElasticsearchRequests的相关统计信息为Sum
。
docs的意思是:
ElasticsearchRequests
对Elasticsearch集群的请求数。
相关统计信息:总和
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。