【问题标题】:Create an alarm for the metric "StatusCheckFailed" in the script using CLI使用 CLI 在脚本中为指标“StatusCheckFailed”创建警报
【发布时间】:2012-10-03 19:32:59
【问题描述】:

我正在使用 cloud watch CLI 编写脚本。作为此脚本的一部分,我需要在状态检查失败时创建警报。 随后的步骤 - 1) 首先,我为 AMI 创建启动配置 2)然后自动扩展组,扩展策略。 3) 现在,我需要创建一个警报,这样当属于 Ami 的实例(从步骤 1 开始)失败时,就会发出警报,这实际上是创建一个新实例。

我在为此创建警报时遇到问题。帮助表示赞赏。

mon-put-metric-alarm TestAlarm --comparisonoperator LessThanToThreshold --evaluation-periods 1 --metric-name StatusCheckFailed --namespace "AWS/EC2" --period 600 --statistic Average --threshold 1 --alarm -actions arn:aws:autoscaling:TestInstance --dimensions "AutoScalingGroupName=TestAutoScalingGroup"

收到的错误是无法识别状态检查失败。

【问题讨论】:

    标签: amazon-ec2 amazon-web-services amazon-cloudwatch


    【解决方案1】:

    mon-put-metric-alarm AuthServerAlarm --comparison-operator GreaterThanOrEqualToThreshold --evaluation-periods 1 --region us-west-1 --metric-name StatusCheckFailed_Any --namespace "AWS/EC2" --period 600 - -statistic 平均 --threshold 1 --alarm-actions arn:aws:autoscaling:us-west-1:13445335:scalingPolicy:1234:newGuid:autoScalingGroupName/TestAutoScalingGroup:policyName/LaunchNewInstance,arn:aws:sns:us-west- 1:123:Test --dimensions "AutoScalingGroupNameTestAutoScalingGroup"

    【讨论】:

      猜你喜欢
      • 2016-08-12
      • 1970-01-01
      • 2020-09-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-08-08
      • 1970-01-01
      相关资源
      最近更新 更多