MON-517: Add variable to configure LB warning threshold

This commit is contained in:
Jordan Caussat 2019-10-21 14:28:55 +02:00
parent 1c0ddfeac0
commit 9f97ace37e
9 changed files with 20 additions and 3 deletions

View File

@ -30,6 +30,7 @@ Creates DataDog monitors with the following checks:
| alb\_no\_healthy\_instances\_enabled | Flag to enable ALB no healthy instances monitor | string | `"true"` | no | | alb\_no\_healthy\_instances\_enabled | Flag to enable ALB no healthy instances monitor | string | `"true"` | no |
| alb\_no\_healthy\_instances\_extra\_tags | Extra tags for ALB no healthy instances monitor | list(string) | `[]` | no | | alb\_no\_healthy\_instances\_extra\_tags | Extra tags for ALB no healthy instances monitor | list(string) | `[]` | no |
| alb\_no\_healthy\_instances\_message | Custom message for ALB no healthy instances monitor | string | `""` | no | | alb\_no\_healthy\_instances\_message | Custom message for ALB no healthy instances monitor | string | `""` | no |
| alb\_no\_healthy\_instances\_threshold\_warning | ALB no healthy instances warning threshold in percentage | string | `"100"` | no |
| alb\_no\_healthy\_instances\_time\_aggregator | Monitor aggregator for ALB no healthy instances [available values: min, max or avg] | string | `"min"` | no | | alb\_no\_healthy\_instances\_time\_aggregator | Monitor aggregator for ALB no healthy instances [available values: min, max or avg] | string | `"min"` | no |
| alb\_no\_healthy\_instances\_timeframe | Monitor timeframe for ALB no healthy instances [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `"last_5m"` | no | | alb\_no\_healthy\_instances\_timeframe | Monitor timeframe for ALB no healthy instances [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `"last_5m"` | no |
| artificial\_requests\_count | Number of false requests used to mitigate false positive in case of low trafic | string | `"5"` | no | | artificial\_requests\_count | Number of false requests used to mitigate false positive in case of low trafic | string | `"5"` | no |

View File

@ -71,6 +71,11 @@ variable "alb_no_healthy_instances_timeframe" {
default = "last_5m" default = "last_5m"
} }
variable "alb_no_healthy_instances_threshold_warning" {
description = "ALB no healthy instances warning threshold in percentage"
default = 100
}
variable "latency_enabled" { variable "latency_enabled" {
description = "Flag to enable ALB latency monitor" description = "Flag to enable ALB latency monitor"
type = string type = string

View File

@ -14,7 +14,7 @@ EOQ
thresholds = { thresholds = {
critical = 1 critical = 1
warning = 100 warning = var.alb_no_healthy_instances_threshold_warning
} }
evaluation_delay = var.evaluation_delay evaluation_delay = var.evaluation_delay

View File

@ -62,6 +62,7 @@ Creates DataDog monitors with the following checks:
| elb\_no\_healthy\_instance\_enabled | Flag to enable ELB no healty instance monitor | string | `"true"` | no | | elb\_no\_healthy\_instance\_enabled | Flag to enable ELB no healty instance monitor | string | `"true"` | no |
| elb\_no\_healthy\_instance\_extra\_tags | Extra tags for ELB no healty instance monitor | list(string) | `[]` | no | | elb\_no\_healthy\_instance\_extra\_tags | Extra tags for ELB no healty instance monitor | list(string) | `[]` | no |
| elb\_no\_healthy\_instance\_message | Custom message for ELB no healty instance monitor | string | `""` | no | | elb\_no\_healthy\_instance\_message | Custom message for ELB no healty instance monitor | string | `""` | no |
| elb\_no\_healthy\_instance\_threshold\_warning | ELB no healthy instances warning threshold in percentage | string | `"100"` | no |
| elb\_no\_healthy\_instance\_time\_aggregator | Monitor aggregator for ELB no healty instance [available values: min or max] | string | `"min"` | no | | elb\_no\_healthy\_instance\_time\_aggregator | Monitor aggregator for ELB no healty instance [available values: min or max] | string | `"min"` | no |
| elb\_no\_healthy\_instance\_timeframe | Monitor timeframe for ELB no healty instance [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `"last_5m"` | no | | elb\_no\_healthy\_instance\_timeframe | Monitor timeframe for ELB no healty instance [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `"last_5m"` | no |
| environment | Architecture Environment | string | n/a | yes | | environment | Architecture Environment | string | n/a | yes |

View File

@ -71,6 +71,11 @@ variable "elb_no_healthy_instance_timeframe" {
default = "last_5m" default = "last_5m"
} }
variable "elb_no_healthy_instance_threshold_warning" {
description = "ELB no healthy instances warning threshold in percentage"
default = 100
}
variable "elb_4xx_enabled" { variable "elb_4xx_enabled" {
description = "Flag to enable ELB 4xx errors monitor" description = "Flag to enable ELB 4xx errors monitor"
type = string type = string

View File

@ -14,7 +14,7 @@ EOQ
thresholds = { thresholds = {
critical = 1 critical = 1
warning = 100 warning = var.elb_no_healthy_instance_threshold_warning
} }
evaluation_delay = var.evaluation_delay evaluation_delay = var.evaluation_delay

View File

@ -32,6 +32,7 @@ Creates DataDog monitors with the following checks:
| nlb\_no\_healthy\_instances\_enabled | Flag to enable NLB no healthy instances monitor | string | `"true"` | no | | nlb\_no\_healthy\_instances\_enabled | Flag to enable NLB no healthy instances monitor | string | `"true"` | no |
| nlb\_no\_healthy\_instances\_extra\_tags | Extra tags for NLB no healthy instances monitor | list(string) | `[]` | no | | nlb\_no\_healthy\_instances\_extra\_tags | Extra tags for NLB no healthy instances monitor | list(string) | `[]` | no |
| nlb\_no\_healthy\_instances\_message | Custom message for NLB no healthy instances monitor | string | `""` | no | | nlb\_no\_healthy\_instances\_message | Custom message for NLB no healthy instances monitor | string | `""` | no |
| nlb\_no\_healthy\_instances\_threshold\_warning | NLB no healthy instances warning threshold in percentage | string | `"100"` | no |
| nlb\_no\_healthy\_instances\_time\_aggregator | Monitor aggregator for NLB no healthy instances [available values: min, max or avg] | string | `"min"` | no | | nlb\_no\_healthy\_instances\_time\_aggregator | Monitor aggregator for NLB no healthy instances [available values: min, max or avg] | string | `"min"` | no |
| nlb\_no\_healthy\_instances\_timeframe | Monitor timeframe for NLB no healthy instances [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `"last_5m"` | no | | nlb\_no\_healthy\_instances\_timeframe | Monitor timeframe for NLB no healthy instances [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `"last_5m"` | 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 |

View File

@ -71,3 +71,7 @@ variable "nlb_no_healthy_instances_timeframe" {
default = "last_5m" default = "last_5m"
} }
variable "nlb_no_healthy_instances_threshold_warning" {
description = "NLB no healthy instances warning threshold in percentage"
default = 100
}

View File

@ -14,7 +14,7 @@ EOQ
thresholds = { thresholds = {
critical = 1 critical = 1
warning = 100 warning = var.nlb_no_healthy_instances_threshold_warning
} }
evaluation_delay = var.evaluation_delay evaluation_delay = var.evaluation_delay