diff --git a/cloud/gcp/lb/README.md b/cloud/gcp/lb/README.md index cc707e7..95b0a91 100644 --- a/cloud/gcp/lb/README.md +++ b/cloud/gcp/lb/README.md @@ -45,14 +45,16 @@ Creates DataDog monitors with the following checks: | error_rate_4xx_extra_tags | Extra tags for GCP LB 4XX Errors monitor | list | `` | no | | error_rate_4xx_message | Custom message for the GCP LB 4XX Errors monitor | string | `` | no | | error_rate_4xx_silenced | Groups to mute for GCP LB 4XX Errors monitor | map | `` | no | -| error_rate_4xx_threshold_critical | Rate error in percentage (critical threshold) | string | `50` | no | +| error_rate_4xx_threshold_critical | Rate error in percentage (critical threshold) | string | `60` | no | +| error_rate_4xx_threshold_warning | Rate error in percentage (warning threshold) | string | `50` | no | | error_rate_4xx_time_aggregator | Timeframe for the GCP LB 4XX Errors monitor | string | `sum` | no | | error_rate_4xx_timeframe | Timeframe for the GCP LB 4XX Errors monitor | string | `last_5m` | no | | error_rate_5xx_artificial_request | Divisor Delta for the GCP LB 5XX Errors monitor | string | `5` | no | | error_rate_5xx_extra_tags | Extra tags for GCP LB 5XX Errors monitor | list | `` | no | | error_rate_5xx_message | Custom message for the GCP LB 5XX Errors monitor | string | `` | no | | error_rate_5xx_silenced | Groups to mute for GCP LB 5XX Errors monitor | map | `` | no | -| error_rate_5xx_threshold_critical | Rate error in percentage (critical threshold) | string | `50` | no | +| error_rate_5xx_threshold_critical | Rate error in percentage (critical threshold) | string | `40` | no | +| error_rate_5xx_threshold_warning | Rate error in percentage (warning threshold) | string | `30` | no | | error_rate_5xx_time_aggregator | Timeframe for the GCP LB 5XX Errors monitor | string | `sum` | no | | error_rate_5xx_timeframe | Timeframe for the GCP LB 5XX Errors monitor | string | `last_5m` | no | | evaluation_delay | Delay in seconds for the metric evaluation | string | `900` | no | diff --git a/cloud/gcp/lb/inputs.tf b/cloud/gcp/lb/inputs.tf index 69f3375..9d02c17 100644 --- a/cloud/gcp/lb/inputs.tf +++ b/cloud/gcp/lb/inputs.tf @@ -52,10 +52,16 @@ variable "error_rate_4xx_artificial_request" { default = 5 } +variable "error_rate_4xx_threshold_warning" { + description = "Rate error in percentage (warning threshold)" + type = "string" + default = 50 +} + variable "error_rate_4xx_threshold_critical" { description = "Rate error in percentage (critical threshold)" type = "string" - default = 50 + default = 60 } variable "error_rate_4xx_silenced" { @@ -97,10 +103,16 @@ variable "error_rate_5xx_artificial_request" { default = 5 } +variable "error_rate_5xx_threshold_warning" { + description = "Rate error in percentage (warning threshold)" + type = "string" + default = 30 +} + variable "error_rate_5xx_threshold_critical" { description = "Rate error in percentage (critical threshold)" type = "string" - default = 50 + default = 40 } variable "error_rate_5xx_silenced" { diff --git a/cloud/gcp/lb/monitors-lb.tf b/cloud/gcp/lb/monitors-lb.tf index 8982222..674091d 100644 --- a/cloud/gcp/lb/monitors-lb.tf +++ b/cloud/gcp/lb/monitors-lb.tf @@ -16,6 +16,7 @@ resource "datadog_monitor" "error_rate_4xx" { EOF thresholds { + warning = "${var.error_rate_4xx_threshold_warning}" critical = "${var.error_rate_4xx_threshold_critical}" } @@ -53,6 +54,7 @@ resource "datadog_monitor" "error_rate_5xx" { EOF thresholds { + warning = "${var.error_rate_5xx_threshold_warning}" critical = "${var.error_rate_5xx_threshold_critical}" }