【发布时间】:2019-03-16 07:30:15
【问题描述】:
我正在尝试使用 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。
我错过了什么吗?
【问题讨论】:
标签: amazon-web-services terraform amazon-cloudwatch terraform-provider-aws amazon-cloudwatch-metrics