【问题标题】:Cloudformation for URLHealthcheck with SNS Alarm带有 SNS 警报的 URLHealthcheck 的 Cloudformation
【发布时间】:2018-03-04 02:59:35
【问题描述】:

我正在尝试定义一个带有警报的 Route53 URL 健康检查,该警报指的是现有的 SNS 主题。

我找不到如何在 Route53 URL 健康检查 CF 模板中定义此警报:

我的 Cloudformation URLHealthCheck 模板:

 ASDDURLHealthCheck: 
    Type: "AWS::Route53::HealthCheck"
    Properties: 
      HealthCheckConfig:
        FullyQualifiedDomainName: "newserver.aws.lilly.com"
        Port: "8888"
        Type: "HTTPS"
        ResourcePath: "/new"
        RequestInterval: "30"
        FailureThreshold: "3"

我想通过以下方式将 SNS 警报添加到上面:

    AlarmActions: 
        -   "arn:aws:sns:us-east-2:xxxxxxx:MySNSTopic"

【问题讨论】:

    标签: amazon-web-services amazon-cloudformation


    【解决方案1】:

    您需要创建“AWS::CloudWatch::Alarm”资源。

    HealthCheckStatusAlarm:
      Type: AWS::CloudWatch::Alarm
      Properties:
        AlarmDescription: HealthCheckStatus
        AlarmActions:
        - arn:aws:sns:us-east-2:xxxxxxx:MySNSTopic
        MetricName: HealthCheckStatus
        Namespace: AWS/Route53
        Statistic: Minimum
        Period: '60'
        EvaluationPeriods: '3'
        Threshold: '1'
        ComparisonOperator: GreaterThanThreshold
        Dimensions:
        - Name: HealthCheckId
          Value:
            Ref: ASDDURLHealthCheck
    

    https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/quickref-cloudwatch.html#cloudwatch-sample-cpu-utilization-alarm

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-03-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-06-23
      • 2020-09-29
      • 2011-09-14
      相关资源
      最近更新 更多