Add alerting thresholds to monitoring. (#254)

This commit is contained in:
Robert Fairburn authored and GitHub committed 2026-06-19 12:17:55 -05:00
1 parent 98cd54a428
commit ba70e93f65
4 files changed
+176 -23

No files matched your search

+30
View File
@@ -146,6 +146,36 @@ module "monitoring" {
}
```
# Configurable Alert Thresholds
All CloudWatch alarm thresholds, periods, and evaluation periods can be overridden via the `alert_thresholds` object. Each alarm type is optional — omit any field to use the module default.
| Field | Alarm | Default threshold | Default period | Default evaluation periods |
|---|---|---|---|---|
| `rds_cpu` | RDS CPU Utilization | 80 | 300s | 1 |
| `redis_cpu` | Redis CPU Utilization | 70 | 300s | 1 |
| `redis_cpu_engine` | Redis Engine CPU Utilization | 25 | 300s | 1 |
| `redis_memory` | Redis Database Memory % | 80 | 300s | 1 |
| `acm_cert_expiry` | ACM Certificate Expiry | 30 days | 86400s | 1 |
| `alb_healthyhosts` | ALB Healthy Host Count | 1 | 60s | 1 |
Example — raise the RDS CPU threshold and require 3 consecutive 5-minute periods before firing (15 minutes total):
```hcl
module "monitoring" {
# ...
alert_thresholds = {
rds_cpu = {
threshold = 90
period = 300
evaluation_periods = 3
}
}
}
```
Anomaly detection alarms (`redis_current_connections`, `redis_replication_lag`, `target_response_time`) are not included — they use CloudWatch anomaly detection bands and do not have a simple threshold/period/evaluation_periods structure.
# SNS topic ARNs map
Valid targets for `sns_topic_arns_map`: