我正在尝试使用 Terraform 创建 AWS cloudwatch 警报。
resource "aws_cloudwatch_metric_alarm" "rds_networkreceivethroughput" {
alarm_name = "rds_network_receive_throughput"
comparison_operator = "GreaterThanOrEqualToThreshold"
evaluation_periods = "5"
metric_name = "NetworkReceiveThroughput"
namespace = "AWS/RDS"
period = "60"
statistic = "Average"
threshold = "10"
unit = "Megabytes/Second"
alarm_description = "The incoming (Receive) network traffic on the DB instanceis greater than threshold"
treat_missing_data = "notBreaching"
alarm_actions = [
"${aws_sns_topic.my_sns.arn}",
]
dimensions {
"DBInstanceIdentifier" = "${var.rds_instance_identifier}"
}
}
我能够创建 cloudwatch 警报,但该单元没有得到应用。应用的单位是10 Bytes/Second
而不是10 Megabytes/Second
。我错过了什么吗?