awscliでCPU使用率80%以上になったらアラートを上げる設定を入れる
1277 ワード
準備
対象のEC2インスタンスIDを取得
連携対象のSNSのarnを取得
コンソール画面上から見てもOK
オプションいっぱいのコマンド
aws cloudwatch put-metric-alarm --alarm-name "CPUUtilization80%" --namespace AWS/EC2 \
--metric-name CPUUtilization --dimensions "Name=InstanceId,Value=i-0219028c30d71bee2" --period 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
参考
Author And Source
この問題について(awscliでCPU使用率80%以上になったらアラートを上げる設定を入れる), 我々は、より多くの情報をここで見つけました https://qiita.com/yuta_vamdemic/items/68dac22f4d09b3f31641著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .