terraform.aws-baseline-infra/modules/ManagementGovernance/Monitoring.OpenSearch
2022-12-19 14:45:23 +08:00
..
main.tf UPD: added more OpenSearch alarms 2022-12-19 14:45:23 +08:00
provider.tf UPD: Added more monitoring modules and various enhancements 2022-10-26 11:13:56 +08:00
README.md DOC: updated readme with examples 2022-11-10 17:10:45 +08:00
variables.tf UPD: added more OpenSearch alarms 2022-12-19 14:45:23 +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 "es-domains" {
  source        = "../../modules/util/resource-list"
  resource-type = "opensearch"
}

module "es-monitoring" {
  cw-alarm-prefix           = local.cw-alarm-prefix
  for_each                  = module.es-domains.result-set
  source                    = "../../modules/ManagementGovernance/Monitoring.OpenSearch"
  default-tags              = local.default-tags
  domain-name               = each.value
  threshold-CPUUtilization  = 90
  threshold-IndexingLatency = 3
  threshold-SearchLatency   = 3
  # threshold-KibanaHealthyNodes = 1
  actions-enabled = var.actions-enabled
  sns-targets = var.sns-targets
}