diff --git a/database/elasticsearch/README.md b/database/elasticsearch/README.md index 00a66eb..b4c8ad7 100644 --- a/database/elasticsearch/README.md +++ b/database/elasticsearch/README.md @@ -170,13 +170,11 @@ Creates DataDog monitors with the following checks: | node_free_space_threshold_warning | Cluster Status warning threshold | string | `20` | no | | node_free_space_time_aggregator | Time aggregator for the Cluster Status monitor | string | `sum` | no | | node_free_space_timeframe | Timeframe for the Cluster Status monitor | string | `last_5m` | no | -| not_responding_by | Group by for the service check | string | `"port","server"` | no | | not_responding_extra_tags | Extra tags for Elasticsearch does not respond monitor | list | `` | no | -| not_responding_last | Parameter 'last' for the service check | string | `1` | no | | not_responding_message | Custom message for Elasticsearch does not respond monitor | string | `` | no | +| not_responding_no_data_timeframe | Elasticsearch not responding monitor no data timeframe | string | `10` | no | | not_responding_silenced | Groups to mute for Elasticsearch does not respond monitor | map | `` | no | -| not_responding_threshold_critical | Not responding limit (critical threshold) | string | `5` | no | -| not_responding_threshold_warning | Not responding limit (warning threshold) | string | `0` | no | +| not_responding_threshold_warning | Elasticsearch not responding limit (warning threshold) | string | `3` | no | | query_cache_evictions_change_extra_tags | Extra tags for Cluster Status monitor | list | `` | no | | query_cache_evictions_change_message | Custom message for the Cluster Status monitor | string | `` | no | | query_cache_evictions_change_silenced | Groups to mute for Cluster Status monitor | map | `` | no | diff --git a/database/elasticsearch/inputs.tf b/database/elasticsearch/inputs.tf index 706fff5..f2739e0 100644 --- a/database/elasticsearch/inputs.tf +++ b/database/elasticsearch/inputs.tf @@ -1068,26 +1068,15 @@ variable "not_responding_message" { default = "" } -variable "not_responding_by" { - description = "Group by for the service check" - type = "string" - default = "\"port\",\"server\"" -} - -variable "not_responding_last" { - description = "Parameter 'last' for the service check" - type = "string" - default = 1 -} - -variable "not_responding_threshold_critical" { - description = "Not responding limit (critical threshold)" - default = 5 -} - variable "not_responding_threshold_warning" { - description = "Not responding limit (warning threshold)" - default = 0 + description = "Elasticsearch not responding limit (warning threshold)" + default = 3 +} + +variable "not_responding_no_data_timeframe" { + description = "Elasticsearch not responding monitor no data timeframe" + type = "string" + default = 10 } variable "not_responding_extra_tags" { diff --git a/database/elasticsearch/monitors-elasticsearch.tf b/database/elasticsearch/monitors-elasticsearch.tf index 76f3ea8..60eebbf 100644 --- a/database/elasticsearch/monitors-elasticsearch.tf +++ b/database/elasticsearch/monitors-elasticsearch.tf @@ -1,3 +1,45 @@ +# +# Service Check +# +resource "datadog_monitor" "not_responding" { + name = "[${var.environment}] ElasticSearch does not respond" + message = "${coalesce(var.not_responding_message, var.message)}" + + query = <