diff --git a/cloud/gcp/lb/README.md b/cloud/gcp/lb/README.md index 05aa2d0..cc707e7 100644 --- a/cloud/gcp/lb/README.md +++ b/cloud/gcp/lb/README.md @@ -29,15 +29,15 @@ Creates DataDog monitors with the following checks: | backend_latency_bucket_extra_tags | Extra tags for GCP LB Backend Latency monitor | list | `` | no | | backend_latency_bucket_message | Custom message for the GCP LB Backend Latency monitor | string | `` | no | | backend_latency_bucket_silenced | Groups to mute for GCP LB Backend Latency monitor | map | `` | no | -| backend_latency_bucket_threshold_critical | Latency in seconds (critical threshold) | string | `8000` | no | -| backend_latency_bucket_threshold_warning | Latency in seconds (warning threshold) | string | `4000` | no | +| backend_latency_bucket_threshold_critical | Latency in milliseconds (critical threshold) | string | `8000` | no | +| backend_latency_bucket_threshold_warning | Latency in milliseconds (warning threshold) | string | `4000` | no | | backend_latency_bucket_time_aggregator | Timeframe for the GCP LB Backend Latency monitor | string | `min` | no | | backend_latency_bucket_timeframe | Timeframe for the GCP LB Backend Latency monitor | string | `last_10m` | no | | backend_latency_service_extra_tags | Extra tags for GCP LB Backend Latency monitor | list | `` | no | | backend_latency_service_message | Custom message for the GCP LB Backend Latency monitor | string | `` | no | | backend_latency_service_silenced | Groups to mute for GCP LB Backend Latency monitor | map | `` | no | -| backend_latency_service_threshold_critical | Latency in seconds (critical threshold) | string | `1500` | no | -| backend_latency_service_threshold_warning | Latency in seconds (warning threshold) | string | `1000` | no | +| backend_latency_service_threshold_critical | Latency in milliseconds (critical threshold) | string | `1500` | no | +| backend_latency_service_threshold_warning | Latency in milliseconds (warning threshold) | string | `1000` | no | | backend_latency_service_time_aggregator | Timeframe for the GCP LB Backend Latency monitor | string | `min` | no | | backend_latency_service_timeframe | Timeframe for the GCP LB Backend Latency monitor | string | `last_10m` | no | | environment | Architecture environment | string | - | yes | diff --git a/cloud/gcp/lb/inputs.tf b/cloud/gcp/lb/inputs.tf index 8644ce9..69f3375 100644 --- a/cloud/gcp/lb/inputs.tf +++ b/cloud/gcp/lb/inputs.tf @@ -137,13 +137,13 @@ variable "backend_latency_service_timeframe" { } variable "backend_latency_service_threshold_warning" { - description = "Latency in seconds (warning threshold)" + description = "Latency in milliseconds (warning threshold)" type = "string" default = 1000 } variable "backend_latency_service_threshold_critical" { - description = "Latency in seconds (critical threshold)" + description = "Latency in milliseconds (critical threshold)" type = "string" default = 1500 } @@ -182,13 +182,13 @@ variable "backend_latency_bucket_timeframe" { } variable "backend_latency_bucket_threshold_warning" { - description = "Latency in seconds (warning threshold)" + description = "Latency in milliseconds (warning threshold)" type = "string" default = 4000 } variable "backend_latency_bucket_threshold_critical" { - description = "Latency in seconds (critical threshold)" + description = "Latency in milliseconds (critical threshold)" type = "string" default = 8000 } diff --git a/cloud/gcp/lb/monitors-lb.tf b/cloud/gcp/lb/monitors-lb.tf index 141e229..8982222 100644 --- a/cloud/gcp/lb/monitors-lb.tf +++ b/cloud/gcp/lb/monitors-lb.tf @@ -76,7 +76,7 @@ EOF # Backend Latency for service # resource "datadog_monitor" "backend_latency_service" { - name = "[${var.environment}] GCP LB service backend latency {{#is_alert}}{{{comparator}}} {{threshold}}s ({{value}}s){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}s ({{value}}s){{/is_warning}}" + name = "[${var.environment}] GCP LB service backend latency {{#is_alert}}{{{comparator}}} {{threshold}}ms ({{value}}ms){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}ms ({{value}}ms){{/is_warning}}" message = "${coalesce(var.backend_latency_service_message, var.message)}" type = "metric alert" @@ -112,7 +112,7 @@ EOF # Backend Latency for bucket # resource "datadog_monitor" "backend_latency_bucket" { - name = "[${var.environment}] GCP LB bucket backend latency {{#is_alert}}{{{comparator}}} {{threshold}}s ({{value}}s){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}s ({{value}}s){{/is_warning}}" + name = "[${var.environment}] GCP LB bucket backend latency {{#is_alert}}{{{comparator}}} {{threshold}}ms ({{value}}ms){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}ms ({{value}}ms){{/is_warning}}" message = "${coalesce(var.backend_latency_bucket_message, var.message)}" type = "metric alert"