UPD: added read write latency checks for RDS
This commit is contained in:
parent
4438ecbcd5
commit
f9b80bd6d2
@ -88,4 +88,50 @@ resource aws_cloudwatch_metric_alarm rds-DiskQueueDepth {
|
||||
lifecycle {
|
||||
ignore_changes = [tags]
|
||||
}
|
||||
}
|
||||
|
||||
resource aws_cloudwatch_metric_alarm rds-ReadLetency {
|
||||
alarm_name = "RDS:ReadLetency:${var.rds-instance-name}"
|
||||
comparison_operator = "GreaterThanThreshold"
|
||||
evaluation_periods = "2"
|
||||
metric_name = "ReadLetency"
|
||||
period = "600"
|
||||
statistic = "Average"
|
||||
threshold = var.threshold-ReadLetency
|
||||
alarm_description = "RDS:ReadLetency"
|
||||
namespace = "AWS/RDS"
|
||||
insufficient_data_actions = []
|
||||
actions_enabled = "true"
|
||||
alarm_actions = [var.alarm-actions-urgent]
|
||||
ok_actions = [var.alarm-actions-urgent]
|
||||
dimensions = {
|
||||
DBInstanceIdentifier = var.rds-instance-name
|
||||
}
|
||||
tags = var.default-tags
|
||||
lifecycle {
|
||||
ignore_changes = [tags]
|
||||
}
|
||||
}
|
||||
|
||||
resource aws_cloudwatch_metric_alarm rds-WriteLetency {
|
||||
alarm_name = "RDS:WriteLetency:${var.rds-instance-name}"
|
||||
comparison_operator = "GreaterThanThreshold"
|
||||
evaluation_periods = "2"
|
||||
metric_name = "WriteLetency"
|
||||
period = "600"
|
||||
statistic = "Average"
|
||||
threshold = var.threshold-WriteLetency
|
||||
alarm_description = "RDS:WriteLetency"
|
||||
namespace = "AWS/RDS"
|
||||
insufficient_data_actions = []
|
||||
actions_enabled = "true"
|
||||
alarm_actions = [var.alarm-actions-urgent]
|
||||
ok_actions = [var.alarm-actions-urgent]
|
||||
dimensions = {
|
||||
DBInstanceIdentifier = var.rds-instance-name
|
||||
}
|
||||
tags = var.default-tags
|
||||
lifecycle {
|
||||
ignore_changes = [tags]
|
||||
}
|
||||
}
|
@ -20,4 +20,6 @@ variable default-tags {}
|
||||
variable threshold-FreeableMemory {}
|
||||
variable threshold-CpuUtilization {}
|
||||
variable threshold-FreeStorageSpace {}
|
||||
variable threshold-DiskQueueDepth {}
|
||||
variable threshold-DiskQueueDepth {}
|
||||
variable threshold-ReadLetency {}
|
||||
variable threshold-WriteLetency {}
|
Loading…
Reference in New Issue
Block a user