module "datadog" {
  source = "git@github.com:theorchard/terraform-datadog.git//modules/s3?ref=6.15.2"

  environment                       = var.environment
  service_name                      = var.service_name
  application_family                = var.application_family
  teams                             = ["devops"]
  notification_endpoints            = "@slack-backup-alerts"
  escalation_notification_endpoints = "@slack-backup-alerts"

  dashboard_configuration = {
    enabled                       = true
    show_advanced_storage_metrics = true
    show_replication_metrics      = true
    show_activity_metrics         = true
  }
  replication_failures_monitor_configuration = {
    enabled = true
  }
  replication_latency_monitor_configuration = {
    enabled = true
    # Set the warning threshold and critical threshold to 6 and 12 hours respectively, as neo4j backup replication can take a long time to complete
    warning_threshold  = 6 * 60 * 60
    critical_threshold = 12 * 60 * 60
  }
}
