我使用异常检测创建了一个 CPU 利用率警报,这显示了一个带有预期 cpu 利用率(异常检测带)的图表,但警报显示“数据不足”并且没有 cpuutilization 的图形线。
aws cloudwatch describe-alarms
给出以下输出,显示配置的指标(删除了帐户 ID)
{
"MetricAlarms": [
{
"AlarmName": "ec2-cpu-anomaly-detection-2",
"AlarmArn": "arn:aws:cloudwatch:eu-west-2:xxxx:ec2-cpu-anomaly-detection-2",
"AlarmDescription": "EC2 CPU usage anomaly detection, acct",
"AlarmConfigurationUpdatedTimestamp": "2021-05-06T13:29:08.848Z",
"ActionsEnabled": true,
"OKActions": [],
"AlarmActions": [],
"InsufficientDataActions": [],
"StateValue": "INSUFFICIENT_DATA",
"StateReason": "Unchecked: Initial alarm creation",
"StateUpdatedTimestamp": "2021-05-06T13:29:08.848Z",
"Dimensions": [],
"EvaluationPeriods": 2,
"ComparisonOperator": "GreaterThanUpperThreshold",
"TreatMissingData": "missing",
"Metrics": [
{
"Id": "m1",
"MetricStat": {
"Metric": {
"Namespace": "AWS/EC2",
"MetricName": "CPUUtilization",
"Dimensions": []
},
"Period": 60,
"Stat": "Average",
"Unit": "Count"
},
"ReturnData": true
},
{
"Id": "e1",
"Expression": "ANOMALY_DETECTION_BAND(m1)",
"Label": "CPUUtilization (Expected)",
"ReturnData": true
}
],
"ThresholdMetricId": "e1"
}
],
"CompositeAlarms": []
}