株式会社ヴァンデミックシステム

Blog

<スポンサーリンク>

awscliで実行

GreaterThanThresholdで閾値が0より大きい場合、アラートが上がるように

aws cloudwatch put-metric-alarm --alarm-name "StatusCheckFailed" --namespace AWS/EC2 \
--metric-name StatusCheckFailed --dimensions Name=InstanceId,Value=i-0219028c30d71bee2 --period 300 \
--statistic Average --threshold 0 --comparison-operator GreaterThanThreshold \
--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

 

<スポンサーリンク>

コメントを残す

Allowed tags:  you may use these HTML tags and attributes: <a href="">, <strong>, <em>, <h1>, <h2>, <h3>
Please note:  all comments go through moderation.

*

日本語が含まれない投稿は無視されますのでご注意ください。(スパム対策)