#
ドキュメント

Document

自分のための備忘録です。

CloudWatch Alarm

AWS::CloudWatch::Alarm

Type: AWS::CloudWatch::Alarm
Properties: 
  ActionsEnabled: Boolean
  AlarmActions: 
    - String
  AlarmDescription: String
  AlarmName: String
  ComparisonOperator: String
  DatapointsToAlarm: Integer
  Dimensions: 
    - Dimension
  EvaluateLowSampleCountPercentile: String
  EvaluationPeriods: Integer
  ExtendedStatistic: String
  InsufficientDataActions: 
    - String
  MetricName: String
  Metrics: 
    - MetricDataQuery
  Namespace: String
  OKActions: 
    - String
  Period: Integer
  Statistic: String
  Threshold: Double
  ThresholdMetricId: String
  TreatMissingData: String
  Unit: String

MetricsNameで指定されたメトリックスがTreshhold(閾値)を超えたらAlarmActionsに指定されたアクションを実行する。 AlarmActionの例としてAWS::ApplicationAutoScaling::ScalingPolicyなどがある。

AlarmActions

WebマネジメントコンソールからEC2のCloudWatch Alarmに設定できるアクションは以下のようなものがある。

  • 通知(SNS)
  • Auto Scaling
  • EC2 アクション
  • System Manager
    アクションの画像

screencapture-ap-northeast-1-console-aws-amazon-cloudwatch-home-2022-02-11-15_24_14

The list of actions to execute when this alarm transitions into an ALARM state from any other state. Specify each action as an Amazon Resource Name (ARN). For more information about creating alarms and the actions that you can specify, see PutMetricAlarm in the Amazon CloudWatch API Reference.

ref. https://docs.aws.amazon.com/ja_jp/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-alarmactions

PutMetricAlarm

Dimensions

Dimension is an embedded property of the AWS::CloudWatch::Alarm type. Dimensions are name/value pairs that can be associated with a CloudWatch metric. You can specify a maximum of 10 dimensions for a given metric.

ref. AWS::CloudWatch::Alarm Dimension