diff --git a/middleware/apache/README.md b/middleware/apache/README.md index 1ed551d..f9dae38 100644 --- a/middleware/apache/README.md +++ b/middleware/apache/README.md @@ -22,8 +22,9 @@ Creates DataDog monitors with the following checks: | Name | Description | Type | Default | Required | |------|-------------|:----:|:-----:|:-----:| -| apache_connect_message | Custom message for Apache process monitor | string | `` | no | -| apache_connect_silenced | Groups to mute for Apache process monitor | map | `` | no | +| apache_connect_message | Custom message for Apache status monitor | string | `` | no | +| apache_connect_silenced | Groups to mute for Apache status monitor | map | `` | no | +| apache_connect_threshold_critical | Apache status monitor (critical threshold) | string | `1.1754943508222875e-38` | no | | delay | Delay in seconds for the metric evaluation | string | `15` | no | | environment | Architecture Environment | string | - | yes | | filter_tags_custom | Tags used for custom filtering when filter_tags_use_defaults is false | string | `*` | no | diff --git a/middleware/apache/inputs.tf b/middleware/apache/inputs.tf index 400d637..0f30b12 100644 --- a/middleware/apache/inputs.tf +++ b/middleware/apache/inputs.tf @@ -27,13 +27,19 @@ variable "filter_tags_custom" { # Apache Middleware specific variable "apache_connect_silenced" { - description = "Groups to mute for Apache process monitor" + description = "Groups to mute for Apache status monitor" type = "map" default = {} } variable "apache_connect_message" { - description = "Custom message for Apache process monitor" + description = "Custom message for Apache status monitor" type = "string" default = "" } + +variable "apache_connect_threshold_critical" { + description = "Apache status monitor (critical threshold)" + type = "string" + default = 1.1754943508222875e-38 +} diff --git a/middleware/apache/monitors-apache.tf b/middleware/apache/monitors-apache.tf index 7755dad..d134287 100644 --- a/middleware/apache/monitors-apache.tf +++ b/middleware/apache/monitors-apache.tf @@ -10,7 +10,7 @@ resource "datadog_monitor" "datadog_apache_process" { thresholds = { warning = 0 - critical = 1.1754943508222875e-38 + critical = "${var.apache_connect_threshold_critical}" } notify_no_data = true diff --git a/middleware/nginx/README.md b/middleware/nginx/README.md index 46f7e37..83351c8 100644 --- a/middleware/nginx/README.md +++ b/middleware/nginx/README.md @@ -22,13 +22,14 @@ Creates DataDog monitors with the following checks: | Name | Description | Type | Default | Required | |------|-------------|:----:|:-----:|:-----:| +| apache_connect_threshold_critical | Nginx status monitor (critical threshold) | string | `1.1754943508222875e-38` | no | | delay | Delay in seconds for the metric evaluation | string | `15` | no | | environment | Architecture Environment | string | - | yes | | filter_tags_custom | Tags used for custom filtering when filter_tags_use_defaults is false | string | `*` | no | | filter_tags_use_defaults | Use default filter tags convention | string | `true` | no | | message | Message sent when an alert is triggered | string | - | yes | -| nginx_connect_message | Custom message for Nginx process monitor | string | `` | no | -| nginx_connect_silenced | Groups to mute for Nginx process monitor | map | `` | no | +| nginx_connect_message | Custom message for Nginx status monitor | string | `` | no | +| nginx_connect_silenced | Groups to mute for Nginx status monitor | map | `` | no | ## Outputs diff --git a/middleware/nginx/inputs.tf b/middleware/nginx/inputs.tf index 7370f6e..a2b248d 100644 --- a/middleware/nginx/inputs.tf +++ b/middleware/nginx/inputs.tf @@ -27,13 +27,19 @@ variable "filter_tags_custom" { # Nginx Middleware specific variable "nginx_connect_silenced" { - description = "Groups to mute for Nginx process monitor" + description = "Groups to mute for Nginx status monitor" type = "map" default = {} } variable "nginx_connect_message" { - description = "Custom message for Nginx process monitor" + description = "Custom message for Nginx status monitor" type = "string" default = "" } + +variable "apache_connect_threshold_critical" { + description = "Nginx status monitor (critical threshold)" + type = "string" + default = 1.1754943508222875e-38 +} diff --git a/middleware/nginx/monitors-nginx.tf b/middleware/nginx/monitors-nginx.tf index a601f15..4f44be5 100644 --- a/middleware/nginx/monitors-nginx.tf +++ b/middleware/nginx/monitors-nginx.tf @@ -10,7 +10,7 @@ resource "datadog_monitor" "datadog_nginx_process" { thresholds = { warning = 0 - critical = 1.1754943508222875e-38 + critical = "${var.nginx_connect_threshold_critical}" } notify_no_data = true