Editing Terraform resource: aws cloudwatch metric alarm
Jump to navigation
Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 43: | Line 43: | ||
} | } | ||
− | + | ||
[[CPU]] | [[CPU]] | ||
resource "aws_cloudwatch_metric_alarm" "db_cpu_utilization_too_high" { | resource "aws_cloudwatch_metric_alarm" "db_cpu_utilization_too_high" { | ||
Line 61: | Line 61: | ||
} | } | ||
− | + | <pre> | |
− | + | resource "aws_cloudwatch_metric_alarm" "db_disk_queue_depth_too_high" { | |
− | |||
alarm_name = format("%s-%s", lower("${var.rds_name}"), "db-highDiskQueueDepth") | alarm_name = format("%s-%s", lower("${var.rds_name}"), "db-highDiskQueueDepth") | ||
comparison_operator = "GreaterThanThreshold" | comparison_operator = "GreaterThanThreshold" | ||
Line 73: | Line 72: | ||
threshold = "10" | threshold = "10" | ||
alarm_description = "Average database disk queue depth is too high, performance may be negatively impacted." | alarm_description = "Average database disk queue depth is too high, performance may be negatively impacted." | ||
− | + | ||
dimensions = { | dimensions = { | ||
DBInstanceIdentifier = aws_db_instance.rds_instance.id | DBInstanceIdentifier = aws_db_instance.rds_instance.id | ||
} | } | ||
− | + | } | |
− | |||
− | |||
− | + | resource "aws_cloudwatch_metric_alarm" "db_disk_free_storage_space_too_low" { | |
alarm_name = format("%s-%s", lower("${var.rds_name}"), "db-lowFreeStorageSpace") | alarm_name = format("%s-%s", lower("${var.rds_name}"), "db-lowFreeStorageSpace") | ||
comparison_operator = "[[LessThanThreshold]]" | comparison_operator = "[[LessThanThreshold]]" | ||
Line 95: | Line 92: | ||
DBInstanceIdentifier = aws_db_instance.rds_instance.id | DBInstanceIdentifier = aws_db_instance.rds_instance.id | ||
} | } | ||
− | + | } | |
− | + | resource "aws_cloudwatch_metric_alarm" "db_memory_freeable_too_low" { | |
− | |||
alarm_name = format("%s-%s", lower("${var.rds_name}"), "db-lowFreeableMemory") | alarm_name = format("%s-%s", lower("${var.rds_name}"), "db-lowFreeableMemory") | ||
comparison_operator = "LessThanThreshold" | comparison_operator = "LessThanThreshold" | ||
Line 112: | Line 108: | ||
DBInstanceIdentifier = aws_db_instance.rds_instance.id | DBInstanceIdentifier = aws_db_instance.rds_instance.id | ||
} | } | ||
− | + | } | |
+ | </pre> | ||
== ChatGPT examples for [[ALB]] (01/2023) == | == ChatGPT examples for [[ALB]] (01/2023) == |
Advertising: