MON-300 Warning added and values adapted for the monitors of GCP LB 4XX and 5XX errors

This commit is contained in:
Rafael Romero Carmona 2018-09-11 16:16:56 +02:00
parent 391240f597
commit 10f11aa958
3 changed files with 20 additions and 4 deletions

View File

@ -45,14 +45,16 @@ Creates DataDog monitors with the following checks:
| error_rate_4xx_extra_tags | Extra tags for GCP LB 4XX Errors monitor | list | `<list>` | no | | error_rate_4xx_extra_tags | Extra tags for GCP LB 4XX Errors monitor | list | `<list>` | no |
| error_rate_4xx_message | Custom message for the GCP LB 4XX Errors monitor | string | `` | no | | error_rate_4xx_message | Custom message for the GCP LB 4XX Errors monitor | string | `` | no |
| error_rate_4xx_silenced | Groups to mute for GCP LB 4XX Errors monitor | map | `<map>` | no | | error_rate_4xx_silenced | Groups to mute for GCP LB 4XX Errors monitor | map | `<map>` | no |
| error_rate_4xx_threshold_critical | Rate error in percentage (critical threshold) | string | `50` | no | | error_rate_4xx_threshold_critical | Rate error in percentage (critical threshold) | string | `60` | no |
| error_rate_4xx_threshold_warning | Rate error in percentage (warning threshold) | string | `50` | no |
| error_rate_4xx_time_aggregator | Timeframe for the GCP LB 4XX Errors monitor | string | `sum` | no | | error_rate_4xx_time_aggregator | Timeframe for the GCP LB 4XX Errors monitor | string | `sum` | no |
| error_rate_4xx_timeframe | Timeframe for the GCP LB 4XX Errors monitor | string | `last_5m` | no | | error_rate_4xx_timeframe | Timeframe for the GCP LB 4XX Errors monitor | string | `last_5m` | no |
| error_rate_5xx_artificial_request | Divisor Delta for the GCP LB 5XX Errors monitor | string | `5` | no | | error_rate_5xx_artificial_request | Divisor Delta for the GCP LB 5XX Errors monitor | string | `5` | no |
| error_rate_5xx_extra_tags | Extra tags for GCP LB 5XX Errors monitor | list | `<list>` | no | | error_rate_5xx_extra_tags | Extra tags for GCP LB 5XX Errors monitor | list | `<list>` | no |
| error_rate_5xx_message | Custom message for the GCP LB 5XX Errors monitor | string | `` | no | | error_rate_5xx_message | Custom message for the GCP LB 5XX Errors monitor | string | `` | no |
| error_rate_5xx_silenced | Groups to mute for GCP LB 5XX Errors monitor | map | `<map>` | no | | error_rate_5xx_silenced | Groups to mute for GCP LB 5XX Errors monitor | map | `<map>` | no |
| error_rate_5xx_threshold_critical | Rate error in percentage (critical threshold) | string | `50` | no | | error_rate_5xx_threshold_critical | Rate error in percentage (critical threshold) | string | `40` | no |
| error_rate_5xx_threshold_warning | Rate error in percentage (warning threshold) | string | `30` | no |
| error_rate_5xx_time_aggregator | Timeframe for the GCP LB 5XX Errors monitor | string | `sum` | no | | error_rate_5xx_time_aggregator | Timeframe for the GCP LB 5XX Errors monitor | string | `sum` | no |
| error_rate_5xx_timeframe | Timeframe for the GCP LB 5XX Errors monitor | string | `last_5m` | no | | error_rate_5xx_timeframe | Timeframe for the GCP LB 5XX Errors monitor | string | `last_5m` | no |
| evaluation_delay | Delay in seconds for the metric evaluation | string | `900` | no | | evaluation_delay | Delay in seconds for the metric evaluation | string | `900` | no |

View File

@ -52,10 +52,16 @@ variable "error_rate_4xx_artificial_request" {
default = 5 default = 5
} }
variable "error_rate_4xx_threshold_warning" {
description = "Rate error in percentage (warning threshold)"
type = "string"
default = 50
}
variable "error_rate_4xx_threshold_critical" { variable "error_rate_4xx_threshold_critical" {
description = "Rate error in percentage (critical threshold)" description = "Rate error in percentage (critical threshold)"
type = "string" type = "string"
default = 50 default = 60
} }
variable "error_rate_4xx_silenced" { variable "error_rate_4xx_silenced" {
@ -97,10 +103,16 @@ variable "error_rate_5xx_artificial_request" {
default = 5 default = 5
} }
variable "error_rate_5xx_threshold_warning" {
description = "Rate error in percentage (warning threshold)"
type = "string"
default = 30
}
variable "error_rate_5xx_threshold_critical" { variable "error_rate_5xx_threshold_critical" {
description = "Rate error in percentage (critical threshold)" description = "Rate error in percentage (critical threshold)"
type = "string" type = "string"
default = 50 default = 40
} }
variable "error_rate_5xx_silenced" { variable "error_rate_5xx_silenced" {

View File

@ -16,6 +16,7 @@ resource "datadog_monitor" "error_rate_4xx" {
EOF EOF
thresholds { thresholds {
warning = "${var.error_rate_4xx_threshold_warning}"
critical = "${var.error_rate_4xx_threshold_critical}" critical = "${var.error_rate_4xx_threshold_critical}"
} }
@ -53,6 +54,7 @@ resource "datadog_monitor" "error_rate_5xx" {
EOF EOF
thresholds { thresholds {
warning = "${var.error_rate_5xx_threshold_warning}"
critical = "${var.error_rate_5xx_threshold_critical}" critical = "${var.error_rate_5xx_threshold_critical}"
} }