I'm looking to set up a notification scheme for my EC2 instances that are in the us-west-2 data center. I have read the CloudWatch and SNS documents, and I know that SMS notifications are only available when configuring SNS themes in us-east-1.
I am wondering if anyone found a way to get CloudWatch warnings for NOT instances in us-east-1 to broadcast on setting up a theme in us-east-1?
, - us-west-2, us-east-1 SMS, ( 10 2014 ):
A client error (ValidationError) occurred when calling the PutMetricAlarm operation: Invalid region us-east-1 specified. Only us-west-2 is supported.
aws cli ( 1234567890):
aws cloudwatch put-metric-alarm --alarm-name "ELB UnHealthy > 0" --alarm-description "ELB UnHealthy > 0" --actions-enabled --ok-actions arn:aws:sns:us-west-2:1234567890:EmailOnly --alarm-actions arn:aws:sns:us-east-1:1234567890:EmailAndSMS --insufficient-data-actions arn:aws:sns:us-west-2:1234567890:EmailOnly --metric-name UnHealthyHostCount --namespace AWS/ELB --statistic Average --dimensions Name=LoadBalancerName,Value=elb-name --period 60 --evaluation-periods 3 --threshold 1 --comparison-operator GreaterThanOrEqualToThreshold
, -, ... , AWS ...
CLI Amazon Cloudwatch. us-west-2, mon-put-metric-alarm ARN us-east-1 alarm-actions.
mon-put-metric-alarm
alarm-actions
export AWS_CLOUDWATCH_URL=http://monitoring.us-west-2.amazonaws.com/ mon-put-metric-alarm --alarm-name my-alarm --alarm-description "some desc" --metric-name CPUUtilization --namespace AWS/EC2 --statistic Average --period 60 --threshold 90 --comparison-operator GreaterThanThreshold --dimensions InstanceId=i-abcdef --evaluation-periods 3 --unit Percent --alarm-actions arn:aws:sns:us-east-1:1234567890:my-topic
:http://docs.aws.amazon.com/AmazonCloudWatch/latest/cli/cli-mon-put-metric-alarm.html
CLI : http://docs.aws.amazon.com/AmazonCloudWatch/latest/cli/SetupCLI.html
, , us-west-1, SMS-, . , us-east-1.
us-west-1 us-east-1 .
aws cloudwatch put-metric-data --region us-east-1 --namespace NameSpace --metric-name MetricName --dimensions InstanceId=i-12345678 --value 10
, us-east-1, SNS SMS-.
, us-east-1 , , . , SNS, .
SMS- SNS .
, us-west-1 us-east-1, , , , .
If you are trying to create alarms in a region other than your default, you must explicitly specify it with the --region parameter (even though this is already implied in ARN).
Source: https://habr.com/ru/post/1542526/More articles:https://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1542521/setting-sqlproj-prepostdeploy-scripts-to-fail-build&usg=ALkJrhi-pWv4VypzQ6_TeJGlY9maMLkGpwAndroid - cell sizes GridLayout - androidLong text on button puts rows GridLayout - androidAVAssetExportSession sporadically calls black frame - iosHow to hone Android bitmap in white? - androidFireFox editableCellTemplate allows you to edit only once - javascriptknitr shows comments from library import - rAdd third-party structure to Xcode subproject or main project in iOS app - iosAzure Powershell Cmds Does Not Work in ISE - powershellThe XSL transition from EAD to MARC skips the second subject term - xmlAll Articles