【问题标题】:Setting up a AWS cloudwatch alert when ElasticsearchRequests are too high当 Elasticsearch 请求太高时设置 AWS cloudwatch 警报
【发布时间】: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


    【解决方案1】:

    根据AWS Doc about monitoring ES clusters,指标ElasticsearchRequests的相关统计数据为Sum

    docs 是这样说的:

    弹性搜索请求

    向 Elasticsearch 集群发出的请求数。

    相关统计数据:总和

    【讨论】:

      猜你喜欢
      • 2023-03-18
      • 2021-10-30
      • 2021-05-25
      • 2019-07-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-10-19
      相关资源
      最近更新 更多