PATH:
usr
/
local
/
jetapps
/
var
/
lib
/
aws
/
lib
/
python2.7
/
site-packages
/
awscli
/
examples
/
cloudwatch
**To send an Amazon Simple Notification Service email message when CPU utilization exceeds 70 percent** The following example uses the ``put-metric-alarm`` command to send an Amazon Simple Notification Service email message when CPU utilization exceeds 70 percent:: aws cloudwatch put-metric-alarm --alarm-name cpu-mon --alarm-description "Alarm when CPU exceeds 70 percent" --metric-name CPUUtilization --namespace AWS/EC2 --statistic Average --period 300 --threshold 70 --comparison-operator GreaterThanThreshold --dimensions "Name=InstanceId,Value=i-12345678" --evaluation-periods 2 --alarm-actions arn:aws:sns:us-east-1:111122223333:MyTopic --unit Percent This command returns to the prompt if successful. If an alarm with the same name already exists, it will be overwritten by the new alarm. **To specify multiple dimensions** The following example illustrates how to specify multiple dimensions. Each dimension is specified as a Name/Value pair, with a comma between the name and the value. Multiple dimensions are separated by a space:: aws cloudwatch put-metric-alarm --alarm-name "Default_Test_Alarm3" --alarm-description "The default example alarm" --namespace "CW EXAMPLE METRICS" --metric-name Default_Test --statistic Average --period 60 --evaluation-periods 3 --threshold 50 --comparison-operator GreaterThanOrEqualToThreshold --dimensions Name=key1,Value=value1 Name=key2,Value=value2
[-] put-metric-alarm.rst
[edit]
[-] delete-alarms.rst
[edit]
[+]
..
[-] describe-alarm-history.rst
[edit]
[-] put-metric-data.rst
[edit]
[-] set-alarm-state.rst
[edit]
[-] get-metric-statistics.rst
[edit]
[-] describe-alarms-for-metric.rst
[edit]
[-] list-metrics.rst
[edit]
[-] disable-alarm-actions.rst
[edit]
[-] describe-alarms.rst
[edit]
[-] enable-alarm-actions.rst
[edit]