diff --git a/middleware/apache/README.md b/middleware/apache/README.md index b41fe1f..f9dae38 100644 --- a/middleware/apache/README.md +++ b/middleware/apache/README.md @@ -16,14 +16,15 @@ module "datadog-monitors-middleware-apache" { Creates DataDog monitors with the following checks: -- Can't connect to apache vhost status +- Apache vhost status does not respond ## Inputs | 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 72bd853..d134287 100644 --- a/middleware/apache/monitors-apache.tf +++ b/middleware/apache/monitors-apache.tf @@ -1,21 +1,19 @@ resource "datadog_monitor" "datadog_apache_process" { - name = "[${var.environment}] Can't connect to apache vhost status" + name = "[${var.environment}] Apache vhost status does not respond" message = "${coalesce(var.apache_connect_message, var.message)}" type = "service check" query = <` | no | +| nginx_connect_message | Custom message for Nginx status monitor | string | `` | no | +| nginx_connect_silenced | Groups to mute for Nginx status monitor | map | `` | no | +| nginx_connect_threshold_critical | Nginx status monitor (critical threshold) | string | `1.1754943508222875e-38` | no | ## Outputs diff --git a/middleware/nginx/inputs.tf b/middleware/nginx/inputs.tf index 7370f6e..d7d4fc1 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 "nginx_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 fe7e6ba..4f44be5 100644 --- a/middleware/nginx/monitors-nginx.tf +++ b/middleware/nginx/monitors-nginx.tf @@ -1,21 +1,19 @@ resource "datadog_monitor" "datadog_nginx_process" { - name = "[${var.environment}] Can't connect to nginx vhost status" + name = "[${var.environment}] Nginx vhost status does not respond" message = "${coalesce(var.nginx_connect_message, var.message)}" type = "service check" query = <