terraform.aws-baseline-infra/modules/ManagementGovernance/Monitoring.Redis
2023-01-05 23:35:31 +08:00
..
main.tf UPD: various bug fixes and enhancements 2023-01-05 23:35:31 +08:00
provider.tf NEW: cloudwatch modules for various resource monitoring 2022-10-25 14:21:37 +08:00
README.md DOC: updated readme with examples 2022-11-10 17:10:45 +08:00
variables.tf UPD: various bug fixes and enhancements 2023-01-05 23:35:31 +08:00

Monitoring module

This module deploys the default cloudwatch metric monitoring

Notes

Terraform lifecycle ignores tags to speed up terraform subsequent update. Cloudwatch alarm tags cannot be read on aws console anyway.

Example

module "redis-instances" {
  source        = "../../modules/util/resource-list"
  resource-type = "redis"
}

module "redis-monitoring" {
  cw-alarm-prefix                         = local.cw-alarm-prefix
  for_each                                = module.redis-instances.result-set
  source                                  = "../../modules/ManagementGovernance/Monitoring.Redis"
  default-tags                            = local.default-tags
  redis-cluster-id                        = each.value
  threshold-EngineCPUUtilization          = 90
  threshold-DatabaseMemoryUsagePercentage = 90
  threshold-CacheHitRate                  = 3
  actions-enabled                         = var.actions-enabled
  sns-targets = var.sns-targets
}