- 新しい順
- 投票が多い順
- コメントが多い順
Oh you're mentioning the namespace AWS/EC2 in your alarm configuration, but only metrics collected directly by the EC2 service will be reported with that namespace. The metrics collected by the CloudWatch agent will be reported with a different namespace. I believe the namespace should be CWAgent rather than AWS/EC2.
Hi, if you can view the metrics in the "All metrics" section, then the agent configuration is OK and it is not likely the place to look for an issue.
The most common issue that leads to an alarm staying in insufficient data when created on a metric that you can view in the console is if you specify an unit on the alarm and that unit doesn't match the metric's unit.
How did you create your alarms and can you share the definition of one of your alarms?
Hey,
I create them with a CloudFormation template:
EC2MemoryUsage1: Type: 'AWS::CloudWatch::Alarm' DependsOn: SNSTopic Properties: AlarmName: !Sub '${CustomerName}-QAS-Submission-MemoryUsage' AlarmDescription: 'Alarm for Memory Usage > 90% on EC2 Instance' AlarmActions: - !Ref SNSTopic Namespace: 'AWS/EC2' MetricName: 'mem_used_percent' Dimensions: - Name: 'InstanceId' Value: !Ref QASSubmissionEC2InstanceId ComparisonOperator: 'GreaterThanThreshold' Threshold: 90 EvaluationPeriods: 1 Period: 21600 #6 hours Statistic: 'Average'
I forgot to mention that I deploy the template in the CloudWatch Monitoring account and the data is grapped from a source account. I followed this page: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html When I create the alarm in the source account it works.
And sorry noticed after previous answer, if you create the alarm in a different account than the source account, you must also mention the account id.
Example:
Metrics:
- Id: m1
ReturnData: true
AccountId: "123456789012"
MetricStat:
Metric:
Namespace: CWAgent
MetricName: mem_used_percent
Dimensions: …
Period: 21600
Stat: Average
関連するコンテンツ
- 質問済み 10ヶ月前
- 質問済み 6年前
Thanks man, you've saved my day!