# # CPU Utilization # resource "datadog_monitor" "cpu_utilization" { count = "${var.cpu_utilization_enabled ? 1 : 0}" name = "[${var.environment}] Compute Engine instance CPU Utilization {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" message = "${coalesce(var.cpu_utilization_message, var.message)}" type = "metric alert" query = < ${var.cpu_utilization_threshold_critical} EOF thresholds { warning = "${var.cpu_utilization_threshold_warning}" critical = "${var.cpu_utilization_threshold_critical}" } notify_audit = false locked = false timeout_h = 0 include_tags = true require_full_window = false notify_no_data = true renotify_interval = 0 evaluation_delay = "${var.evaluation_delay}" new_host_delay = "${var.new_host_delay}" silenced = "${var.cpu_utilization_silenced}" tags = ["env:${var.environment}", "type:cloud", "provider:gcp", "resource:gce-instance", "team:claranet", "created-by:terraform", "${var.cpu_utilization_extra_tags}"] } # # Disk Throttled Bps # resource "datadog_monitor" "disk_throttled_bps" { count = "${var.disk_throttled_bps_enabled ? 1 : 0}" name = "[${var.environment}] Compute Engine instance Disk Throttled Bps {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" message = "${coalesce(var.disk_throttled_bps_message, var.message)}" type = "metric alert" query = < ${var.disk_throttled_bps_threshold_critical} EOF thresholds { warning = "${var.disk_throttled_bps_threshold_warning}" critical = "${var.disk_throttled_bps_threshold_critical}" } notify_audit = false locked = false timeout_h = 0 include_tags = true require_full_window = false notify_no_data = "${var.disk_throttled_bps_notify_no_data}" renotify_interval = 0 evaluation_delay = "${var.evaluation_delay}" new_host_delay = "${var.new_host_delay}" silenced = "${var.disk_throttled_bps_silenced}" tags = ["env:${var.environment}", "type:cloud", "provider:gcp", "resource:gce-instance", "team:claranet", "created-by:terraform", "${var.disk_throttled_bps_extra_tags}"] } # # Disk Throttled OPS # resource "datadog_monitor" "disk_throttled_ops" { count = "${var.disk_throttled_ops_enabled ? 1 : 0}" name = "[${var.environment}] Compute Engine instance Disk Throttled OPS {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" message = "${coalesce(var.disk_throttled_ops_message, var.message)}" type = "metric alert" query = < ${var.disk_throttled_ops_threshold_critical} EOF thresholds { warning = "${var.disk_throttled_ops_threshold_warning}" critical = "${var.disk_throttled_ops_threshold_critical}" } notify_audit = false locked = false timeout_h = 0 include_tags = true require_full_window = false notify_no_data = "${var.disk_throttled_ops_notify_no_data}" renotify_interval = 0 evaluation_delay = "${var.evaluation_delay}" new_host_delay = "${var.new_host_delay}" silenced = "${var.disk_throttled_ops_silenced}" tags = ["env:${var.environment}", "type:cloud", "provider:gcp", "resource:gce-instance", "team:claranet", "created-by:terraform", "${var.disk_throttled_ops_extra_tags}"] }