amazon-cloudformation - 当 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
forStatistic
吗?
非常感谢任何建议
解决方案
根据 AWS Doc about monitoring ES clusters,指标 ElasticsearchRequests 的相关统计数据为Sum
.
这是文档所说的:
弹性搜索请求
向 Elasticsearch 集群发出的请求数。
相关统计:Sum
推荐阅读
- c# - 当我使用视图创建控制器时,使用 EF 核心数据库上下文(应用程序数据库上下文)没有进入 asp.net 核心
- flutter - 如何在 Flutter 的灵活小部件中使用 flex 参数?
- node.js - 如何安装 numjs
- c++ - 给定 C++ 代码的时间复杂度是多少?
- cakephp - CakePHP 只本地化部分页面
- java - Java 将 Map 内的 Map 转换为单个聚合 Map
- java - 计算一个单词在 Java Netbeans 中的 JTable 中重复了多少次
- android - Admob 横幅广告未显示
- python - 比较 2 个列表
- javascript - 从数组 _ JavaScript 中的元素组合创建新数组