MON-498 Parameters last and critical threshold removed for the service check. Warning threshold added as parameter.

This commit is contained in:
Rafael Romero Carmona 2019-08-29 13:27:44 +01:00
parent cdb3a284dc
commit 4ec5bbab0d
3 changed files with 8 additions and 14 deletions

View File

@ -32,10 +32,9 @@ Creates DataDog monitors with the following checks:
| new\_host\_delay | Delay in seconds before monitor new resource | string | `"300"` | no | | new\_host\_delay | Delay in seconds before monitor new resource | string | `"300"` | no |
| not\_responding\_enabled | Flag to enable Kong does not respond monitor | string | `"true"` | no | | not\_responding\_enabled | Flag to enable Kong does not respond monitor | string | `"true"` | no |
| not\_responding\_extra\_tags | Extra tags for Kong does not respond monitor | list(string) | `[]` | no | | not\_responding\_extra\_tags | Extra tags for Kong does not respond monitor | list(string) | `[]` | no |
| not\_responding\_last | Parameter 'last' for the service check | string | `"6"` | no |
| not\_responding\_message | Custom message for Kong does not respond monitor | string | `""` | no | | not\_responding\_message | Custom message for Kong does not respond monitor | string | `""` | no |
| not\_responding\_no\_data\_timeframe | Kong does not respond monitor no data timeframe | string | `"10"` | no | | not\_responding\_no\_data\_timeframe | Kong does not respond monitor no data timeframe | string | `"10"` | no |
| not\_responding\_threshold\_critical | Parameter 'last' for the service check | string | `"5"` | no | | not\_responding\_threshold\_warning | Warning threshold for the service check | string | `"3"` | no |
| prefix\_slug | Prefix string to prepend between brackets on every monitors names | string | `""` | no | | prefix\_slug | Prefix string to prepend between brackets on every monitors names | string | `""` | no |
| treatment\_limit\_enabled | Flag to enable Kong Treatment Limit monitor | string | `"true"` | no | | treatment\_limit\_enabled | Flag to enable Kong Treatment Limit monitor | string | `"true"` | no |
| treatment\_limit\_extra\_tags | Extra tags for Kong Treatment Limit monitor | list(string) | `[]` | no | | treatment\_limit\_extra\_tags | Extra tags for Kong Treatment Limit monitor | list(string) | `[]` | no |

View File

@ -55,16 +55,10 @@ variable "not_responding_message" {
default = "" default = ""
} }
variable "not_responding_last" { variable "not_responding_threshold_warning" {
description = "Parameter 'last' for the service check" description = "Warning threshold for the service check"
type = string type = string
default = 6 default = 3
}
variable "not_responding_threshold_critical" {
description = "Parameter 'last' for the service check"
type = string
default = 5
} }
variable "not_responding_no_data_timeframe" { variable "not_responding_no_data_timeframe" {
@ -80,7 +74,7 @@ variable "not_responding_extra_tags" {
} }
# #
# treatment Limit # Treatment Limit
# #
variable "treatment_limit_enabled" { variable "treatment_limit_enabled" {
description = "Flag to enable Kong Treatment Limit monitor" description = "Flag to enable Kong Treatment Limit monitor"

View File

@ -8,11 +8,12 @@ resource "datadog_monitor" "not_responding" {
type = "service check" type = "service check"
query = <<EOQ query = <<EOQ
"kong.can_connect"${module.filter-tags.service_check}.by("kong_host","kong_port").last(${var.not_responding_last}).count_by_status() "kong.can_connect"${module.filter-tags.service_check}.by("kong_host","kong_port").last(6).count_by_status()
EOQ EOQ
thresholds = { thresholds = {
critical = var.not_responding_threshold_critical warning = var.not_responding_threshold_warning
critical = 5
} }
new_host_delay = var.new_host_delay new_host_delay = var.new_host_delay