準備
awscliで実行
カスタムメトリクスなので、--namespace System/Linux
になります。注意
1 2 3 4 5 6 7 8 9 10 |
aws cloudwatch put-metric-alarm --alarm-name "MemoryUtilization80%" --namespace System / Linux \ --metric-name MemoryUtilization --dimensions "Name = InstanceId、Value = i-0219028c30d71bee2"-期間300 \ --statistic Average --threshold 80 --comparison-operator GreaterThanOrEqualToThreshold¥ --evaluation-periods 1 --alarm-actions arn:aws:sns:ap-northeast-1: 697333814928:Default_CloudWatch_Alarms_Topic \ --ok-actions arn:aws:sns:ap-northeast-1:697333814928:Default_ CloudWatch_Alarms_Topic |