MON-160 - AWS monitors updated
This commit is contained in:
parent
3f17c0215c
commit
3c3ce6b3ae
@ -35,14 +35,17 @@ Inputs
|
||||
| http_4xx_requests_silenced | Groups to mute for API Gateway HTTP 4xx requests monitor | map | `<map>` | no |
|
||||
| http_4xx_requests_threshold_critical | Maximum critical acceptable percent of 4xx errors | string | `30` | no |
|
||||
| http_4xx_requests_threshold_warning | Maximum warning acceptable percent of 4xx errors | string | `15` | no |
|
||||
| http_4xx_requests_timeframe | Monitor timeframe for API HTTP 4xx requests [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no |
|
||||
| http_5xx_requests_message | Custom message for API Gateway HTTP 5xx requests monitor | string | `` | no |
|
||||
| http_5xx_requests_silenced | Groups to mute for API Gateway HTTP 5xx requests monitor | map | `<map>` | no |
|
||||
| http_5xx_requests_threshold_critical | Maximum critical acceptable percent of 5xx errors | string | `20` | no |
|
||||
| http_5xx_requests_threshold_warning | Maximum warning acceptable percent of 5xx errors | string | `10` | no |
|
||||
| http_5xx_requests_timeframe | Monitor timeframe for API HTTP 5xx requests [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no |
|
||||
| latency_message | Custom message for API Gateway latency monitor | string | `` | no |
|
||||
| latency_silenced | Groups to mute for API Gateway latency monitor | map | `<map>` | no |
|
||||
| latency_threshold_critical | Alerting threshold in milliseconds | string | `800` | no |
|
||||
| latency_threshold_warning | Warning threshold in milliseconds | string | `400` | no |
|
||||
| latency_timeframe | Monitor timeframe for API latency [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no |
|
||||
| message | Message sent when a monitor is triggered | string | - | yes |
|
||||
|
||||
Related documentation
|
||||
|
||||
@ -33,6 +33,12 @@ variable "latency_message" {
|
||||
default = ""
|
||||
}
|
||||
|
||||
variable "latency_timeframe" {
|
||||
description = "Monitor timeframe for API latency [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]"
|
||||
type = "string"
|
||||
default = "last_5m"
|
||||
}
|
||||
|
||||
variable "latency_threshold_critical" {
|
||||
default = 800
|
||||
description = "Alerting threshold in milliseconds"
|
||||
@ -59,6 +65,12 @@ variable "http_5xx_requests_message" {
|
||||
default = ""
|
||||
}
|
||||
|
||||
variable "http_5xx_requests_timeframe" {
|
||||
description = "Monitor timeframe for API HTTP 5xx requests [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]"
|
||||
type = "string"
|
||||
default = "last_5m"
|
||||
}
|
||||
|
||||
variable "http_5xx_requests_threshold_critical" {
|
||||
default = 20
|
||||
description = "Maximum critical acceptable percent of 5xx errors"
|
||||
@ -85,6 +97,12 @@ variable "http_4xx_requests_message" {
|
||||
default = ""
|
||||
}
|
||||
|
||||
variable "http_4xx_requests_timeframe" {
|
||||
description = "Monitor timeframe for API HTTP 4xx requests [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]"
|
||||
type = "string"
|
||||
default = "last_5m"
|
||||
}
|
||||
|
||||
variable "http_4xx_requests_threshold_critical" {
|
||||
default = 30
|
||||
description = "Maximum critical acceptable percent of 4xx errors"
|
||||
|
||||
@ -5,7 +5,7 @@ resource "datadog_monitor" "API_Gateway_latency" {
|
||||
message = "${coalesce(var.latency_message, var.message)}"
|
||||
|
||||
query = <<EOF
|
||||
min(last_5m): (
|
||||
min(${var.latency_timeframe}): (
|
||||
min:aws.apigateway.latency{${var.filter_tags}} by {region,apiname}
|
||||
) > ${var.latency_threshold_critical}
|
||||
EOF
|
||||
@ -36,7 +36,7 @@ resource "datadog_monitor" "API_http_5xx_errors_count" {
|
||||
message = "${coalesce(var.http_5xx_requests_message, var.message)}"
|
||||
|
||||
query = <<EOF
|
||||
min(last_5m): (
|
||||
min(${var.http_5xx_requests_timeframe}): (
|
||||
default(
|
||||
min:aws.apigateway.5xxerror{${var.filter_tags}} by {region,apiname}.as_count() /
|
||||
(min:aws.apigateway.count{${var.filter_tags}} by {region,apiname}.as_count() + ${var.artificial_requests_count}),
|
||||
@ -70,7 +70,7 @@ resource "datadog_monitor" "API_http_4xx_errors_count" {
|
||||
message = "${coalesce(var.http_4xx_requests_message, var.message)}"
|
||||
|
||||
query = <<EOF
|
||||
min(last_5m): (
|
||||
min(${var.http_4xx_requests_timeframe}): (
|
||||
default(
|
||||
min:aws.apigateway.4xxerror{${var.filter_tags}} by {region,apiname}.as_count() /
|
||||
(min:aws.apigateway.count{${var.filter_tags}} by {region,apiname}.as_count() + ${var.artificial_requests_count}),
|
||||
|
||||
@ -33,14 +33,17 @@ Inputs
|
||||
| cpu_silenced | Groups to mute for ES cluster cpu monitor | map | `<map>` | no |
|
||||
| cpu_threshold_critical | CPU usage in percent (critical threshold) | string | `90` | no |
|
||||
| cpu_threshold_warning | CPU usage in percent (warning threshold) | string | `80` | no |
|
||||
| cpu_timeframe | Monitor timeframe for ES cluster cpu [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_15m` | no |
|
||||
| delay | Delay in seconds for the metric evaluation | string | `900` | no |
|
||||
| diskspace_message | Custom message for ES cluster diskspace monitor | string | `` | no |
|
||||
| diskspace_silenced | Groups to mute for ES cluster diskspace monitor | map | `<map>` | no |
|
||||
| diskspace_threshold_critical | Disk free space in percent (critical threshold) | string | `10` | no |
|
||||
| diskspace_threshold_warning | Disk free space in percent (warning threshold) | string | `20` | no |
|
||||
| diskspace_timeframe | Monitor timeframe for ES cluster diskspace [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_15m` | no |
|
||||
| environment | Architecture Environment | string | - | yes |
|
||||
| es_cluster_status_message | Custom message for ES cluster status monitor | string | `` | no |
|
||||
| es_cluster_status_silenced | Groups to mute for ES cluster status monitor | map | `<map>` | no |
|
||||
| es_cluster_status_timeframe | Monitor timeframe for ES cluster status [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_30m` | no |
|
||||
| es_cluster_volume_size | ElasticSearch Domain volume size (in GB) | string | - | yes |
|
||||
| filter_tags_custom | Tags used for custom filtering when filter_tags_use_defaults is false | string | `*` | no |
|
||||
| filter_tags_use_defaults | Use default filter tags convention | string | `true` | no |
|
||||
|
||||
@ -38,6 +38,12 @@ variable "es_cluster_status_message" {
|
||||
default = ""
|
||||
}
|
||||
|
||||
variable "es_cluster_status_timeframe" {
|
||||
description = "Monitor timeframe for ES cluster status [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]"
|
||||
type = "string"
|
||||
default = "last_30m"
|
||||
}
|
||||
|
||||
variable "es_cluster_volume_size" {
|
||||
description = "ElasticSearch Domain volume size (in GB)"
|
||||
}
|
||||
@ -54,6 +60,12 @@ variable "diskspace_message" {
|
||||
default = ""
|
||||
}
|
||||
|
||||
variable "diskspace_timeframe" {
|
||||
description = "Monitor timeframe for ES cluster diskspace [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]"
|
||||
type = "string"
|
||||
default = "last_15m"
|
||||
}
|
||||
|
||||
variable "diskspace_threshold_warning" {
|
||||
description = "Disk free space in percent (warning threshold)"
|
||||
default = "20"
|
||||
@ -76,6 +88,12 @@ variable "cpu_message" {
|
||||
default = ""
|
||||
}
|
||||
|
||||
variable "cpu_timeframe" {
|
||||
description = "Monitor timeframe for ES cluster cpu [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]"
|
||||
type = "string"
|
||||
default = "last_15m"
|
||||
}
|
||||
|
||||
variable "cpu_threshold_warning" {
|
||||
description = "CPU usage in percent (warning threshold)"
|
||||
default = "80"
|
||||
|
||||
@ -18,7 +18,7 @@ resource "datadog_monitor" "es_cluster_status" {
|
||||
type = "metric alert"
|
||||
|
||||
query = <<EOF
|
||||
max(last_30m): (
|
||||
max(${var.es_cluster_status_timeframe}): (
|
||||
avg:aws.es.cluster_statusred{${data.template_file.filter.rendered}} by {region,name} * 2 +
|
||||
(avg:aws.es.cluster_statusyellow{${data.template_file.filter.rendered}} by {region,name} + 0.1)
|
||||
) >= 2
|
||||
@ -52,7 +52,7 @@ resource "datadog_monitor" "es_free_space_low" {
|
||||
type = "metric alert"
|
||||
|
||||
query = <<EOF
|
||||
avg(last_15m): (
|
||||
avg(${var.diskspace_timeframe}): (
|
||||
avg:aws.es.free_storage_space{${data.template_file.filter.rendered}} by {region,name} /
|
||||
(${var.es_cluster_volume_size}*1000) * 100
|
||||
) < ${var.diskspace_threshold_critical}
|
||||
@ -86,7 +86,7 @@ resource "datadog_monitor" "es_cpu_90_15min" {
|
||||
type = "metric alert"
|
||||
|
||||
query = <<EOF
|
||||
avg(last_15m): (
|
||||
avg(${var.cpu_timeframe}): (
|
||||
avg:aws.es.cpuutilization{${data.template_file.filter.rendered}} by {region,name}
|
||||
) > ${var.cpu_threshold_critical}
|
||||
EOF
|
||||
|
||||
@ -30,32 +30,37 @@ Inputs
|
||||
|
||||
| Name | Description | Type | Default | Required |
|
||||
|------|-------------|:----:|:-----:|:-----:|
|
||||
| dd_aws_elb | # ELB | string | `disable` | no |
|
||||
| artificial_requests_count | Number of false requests used to mitigate false positive in case of low trafic | string | `5` | no |
|
||||
| delay | Delay in seconds for the metric evaluation | string | `900` | no |
|
||||
| elb_4xx_message | Custom message for ELB 4xx errors monitor | string | `` | no |
|
||||
| elb_4xx_silenced | Groups to mute for ELB 4xx errors monitor | map | `<map>` | no |
|
||||
| elb_4xx_threshold_critical | loadbalancer 4xx critical threshold in percentage | string | `10` | no |
|
||||
| elb_4xx_threshold_warning | loadbalancer 4xx warning threshold in percentage | string | `5` | no |
|
||||
| elb_4xx_timeframe | Monitor timeframe for ELB 4xx errors [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no |
|
||||
| elb_5xx_message | Custom message for ELB 5xx errors monitor | string | `` | no |
|
||||
| elb_5xx_silenced | Groups to mute for ELB 5xx errors monitor | map | `<map>` | no |
|
||||
| elb_5xx_threshold_critical | loadbalancer 5xx critical threshold in percentage | string | `10` | no |
|
||||
| elb_5xx_threshold_warning | loadbalancer 5xx warning threshold in percentage | string | `5` | no |
|
||||
| elb_5xx_timeframe | Monitor timeframe for ELB 5xx errors [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no |
|
||||
| elb_backend_4xx_message | Custom message for ELB backend 4xx errors monitor | string | `` | no |
|
||||
| elb_backend_4xx_silenced | Groups to mute for ELB backend 4xx errors monitor | map | `<map>` | no |
|
||||
| elb_backend_4xx_threshold_critical | loadbalancer backend 4xx critical threshold in percentage | string | `10` | no |
|
||||
| elb_backend_4xx_threshold_warning | loadbalancer backend 4xx warning threshold in percentage | string | `5` | no |
|
||||
| elb_backend_4xx_timeframe | Monitor timeframe for ELB backend 4xx errors [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no |
|
||||
| elb_backend_5xx_message | Custom message for ELB backend 5xx errors monitor | string | `` | no |
|
||||
| elb_backend_5xx_silenced | Groups to mute for ELB backend 5xx errors monitor | map | `<map>` | no |
|
||||
| elb_backend_5xx_threshold_critical | loadbalancer backend 5xx critical threshold in percentage | string | `10` | no |
|
||||
| elb_backend_5xx_threshold_warning | loadbalancer backend 5xx warning threshold in percentage | string | `5` | no |
|
||||
| elb_backend_5xx_timeframe | Monitor timeframe for ELB backend 5xx errors [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no |
|
||||
| elb_backend_latency_critical | latency critical threshold in seconds | string | `5` | no |
|
||||
| elb_backend_latency_message | Custom message for ELB backend latency monitor | string | `` | no |
|
||||
| elb_backend_latency_silenced | Groups to mute for ELB backend latency monitor | map | `<map>` | no |
|
||||
| elb_backend_latency_timeframe | Monitor timeframe for ELB backend latency [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no |
|
||||
| elb_backend_latency_warning | latency warning threshold in seconds | string | `1` | no |
|
||||
| elb_no_healthy_instance_message | Custom message for ELB no healty instance monitor | string | `` | no |
|
||||
| elb_no_healthy_instance_silenced | Groups to mute for ELB no healty instance monitor | map | `<map>` | 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 | - | yes |
|
||||
| delay | Delay in seconds for the metric evaluation | string | `900` | no |
|
||||
| filter_tags_custom | Tags used for custom filtering when filter_tags_use_defaults is false | string | `*` | no |
|
||||
| filter_tags_use_defaults | Use default filter tags convention | string | `true` | no |
|
||||
| message | Message sent when an alert is triggered | string | - | yes |
|
||||
|
||||
@ -25,10 +25,6 @@ variable "filter_tags_custom" {
|
||||
}
|
||||
|
||||
## ELB
|
||||
variable "dd_aws_elb" {
|
||||
default = "disable"
|
||||
}
|
||||
|
||||
variable "elb_no_healthy_instance_silenced" {
|
||||
description = "Groups to mute for ELB no healty instance monitor"
|
||||
type = "map"
|
||||
@ -41,6 +37,12 @@ variable "elb_no_healthy_instance_message" {
|
||||
default = ""
|
||||
}
|
||||
|
||||
variable "elb_no_healthy_instance_timeframe" {
|
||||
description = "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`]"
|
||||
type = "string"
|
||||
default = "last_5m"
|
||||
}
|
||||
|
||||
variable "elb_4xx_silenced" {
|
||||
description = "Groups to mute for ELB 4xx errors monitor"
|
||||
type = "map"
|
||||
@ -53,6 +55,12 @@ variable "elb_4xx_message" {
|
||||
default = ""
|
||||
}
|
||||
|
||||
variable "elb_4xx_timeframe" {
|
||||
description = "Monitor timeframe for ELB 4xx errors [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]"
|
||||
type = "string"
|
||||
default = "last_5m"
|
||||
}
|
||||
|
||||
variable "elb_4xx_threshold_warning" {
|
||||
description = "loadbalancer 4xx warning threshold in percentage"
|
||||
default = 5
|
||||
@ -75,6 +83,12 @@ variable "elb_5xx_message" {
|
||||
default = ""
|
||||
}
|
||||
|
||||
variable "elb_5xx_timeframe" {
|
||||
description = "Monitor timeframe for ELB 5xx errors [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]"
|
||||
type = "string"
|
||||
default = "last_5m"
|
||||
}
|
||||
|
||||
variable "elb_5xx_threshold_warning" {
|
||||
description = "loadbalancer 5xx warning threshold in percentage"
|
||||
default = 5
|
||||
@ -97,6 +111,12 @@ variable "elb_backend_4xx_message" {
|
||||
default = ""
|
||||
}
|
||||
|
||||
variable "elb_backend_4xx_timeframe" {
|
||||
description = "Monitor timeframe for ELB backend 4xx errors [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]"
|
||||
type = "string"
|
||||
default = "last_5m"
|
||||
}
|
||||
|
||||
variable "elb_backend_4xx_threshold_warning" {
|
||||
description = "loadbalancer backend 4xx warning threshold in percentage"
|
||||
default = 5
|
||||
@ -119,6 +139,12 @@ variable "elb_backend_5xx_message" {
|
||||
default = ""
|
||||
}
|
||||
|
||||
variable "elb_backend_5xx_timeframe" {
|
||||
description = "Monitor timeframe for ELB backend 5xx errors [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]"
|
||||
type = "string"
|
||||
default = "last_5m"
|
||||
}
|
||||
|
||||
variable "elb_backend_5xx_threshold_warning" {
|
||||
description = "loadbalancer backend 5xx warning threshold in percentage"
|
||||
default = 5
|
||||
@ -141,6 +167,12 @@ variable "elb_backend_latency_message" {
|
||||
default = ""
|
||||
}
|
||||
|
||||
variable "elb_backend_latency_timeframe" {
|
||||
description = "Monitor timeframe for ELB backend latency [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]"
|
||||
type = "string"
|
||||
default = "last_5m"
|
||||
}
|
||||
|
||||
variable "elb_backend_latency_warning" {
|
||||
description = "latency warning threshold in seconds"
|
||||
default = 1
|
||||
|
||||
@ -11,7 +11,7 @@ resource "datadog_monitor" "ELB_no_healthy_instances" {
|
||||
message = "${coalesce(var.elb_no_healthy_instance_message, var.message)}"
|
||||
|
||||
query = <<EOF
|
||||
min(last_5m): (
|
||||
min(${var.elb_no_healthy_instance_timeframe}): (
|
||||
min:aws.elb.healthy_host_count{${data.template_file.filter.rendered}} by {region,loadbalancername}
|
||||
) < 1
|
||||
EOF
|
||||
@ -38,7 +38,7 @@ resource "datadog_monitor" "ELB_too_much_4xx" {
|
||||
message = "${coalesce(var.elb_4xx_message, var.message)}"
|
||||
|
||||
query = <<EOF
|
||||
min(last_5m): (
|
||||
min(${var.elb_4xx_timeframe}): (
|
||||
default(
|
||||
min:aws.elb.httpcode_elb_4xx{${data.template_file.filter.rendered}} by {region,loadbalancername}.as_count() /
|
||||
(min:aws.elb.request_count{${data.template_file.filter.rendered}} by {region,loadbalancername}.as_count() + ${var.artificial_requests_count}),
|
||||
@ -73,7 +73,7 @@ resource "datadog_monitor" "ELB_too_much_5xx" {
|
||||
message = "${coalesce(var.elb_5xx_message, var.message)}"
|
||||
|
||||
query = <<EOF
|
||||
min(last_5m): (
|
||||
min(${var.elb_5xx_timeframe}): (
|
||||
default(
|
||||
min:aws.elb.httpcode_elb_5xx{${data.template_file.filter.rendered}} by {region,loadbalancername} /
|
||||
(min:aws.elb.request_count{${data.template_file.filter.rendered}} by {region,loadbalancername} + ${var.artificial_requests_count}),
|
||||
@ -108,7 +108,7 @@ resource "datadog_monitor" "ELB_too_much_4xx_backend" {
|
||||
message = "${coalesce(var.elb_backend_4xx_message, var.message)}"
|
||||
|
||||
query = <<EOF
|
||||
min(last_5m): (
|
||||
min(${var.elb_backend_4xx_timeframe}): (
|
||||
default(
|
||||
min:aws.elb.httpcode_backend_4xx{${data.template_file.filter.rendered}} by {region,loadbalancername} /
|
||||
(min:aws.elb.request_count{${data.template_file.filter.rendered}} by {region,loadbalancername} + ${var.artificial_requests_count}),
|
||||
@ -143,7 +143,7 @@ resource "datadog_monitor" "ELB_too_much_5xx_backend" {
|
||||
message = "${coalesce(var.elb_backend_5xx_message, var.message)}"
|
||||
|
||||
query = <<EOF
|
||||
min(last_5m): (
|
||||
min(${var.elb_backend_5xx_timeframe}): (
|
||||
default(
|
||||
min:aws.elb.httpcode_backend_5xx{${data.template_file.filter.rendered}} by {region,loadbalancername} /
|
||||
(min:aws.elb.request_count{${data.template_file.filter.rendered}} by {region,loadbalancername} + ${var.artificial_requests_count}),
|
||||
@ -178,7 +178,7 @@ resource "datadog_monitor" "ELB_backend_latency" {
|
||||
message = "${coalesce(var.elb_backend_latency_message, var.message)}"
|
||||
|
||||
query = <<EOF
|
||||
min(last_5m): (
|
||||
min(${var.elb_backend_latency_warning}): (
|
||||
min:aws.elb.latency{${data.template_file.filter.rendered}} by {region,loadbalancername}
|
||||
) > ${var.elb_backend_latency_critical}
|
||||
EOF
|
||||
|
||||
@ -29,12 +29,14 @@ Inputs
|
||||
| cpu_silenced | Groups to mute for RDS CPU usage monitor | map | `<map>` | no |
|
||||
| cpu_threshold_critical | CPU usage in percent (critical threshold) | string | `90` | no |
|
||||
| cpu_threshold_warning | CPU usage in percent (warning threshold) | string | `80` | no |
|
||||
| cpu_timeframe | Monitor timeframe for RDS CPU usage [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_15m` | no |
|
||||
| delay | Delay in seconds for the metric evaluation | string | `900` | no |
|
||||
| diskspace_message | Custom message for RDS free diskspace monitor | string | `` | no |
|
||||
| diskspace_silenced | Groups to mute for RDS free diskspace monitor | map | `<map>` | no |
|
||||
| diskspace_threshold_critical | Disk free space in percent (critical threshold) | string | `10` | no |
|
||||
| diskspace_threshold_warning | Disk free space in percent (warning threshold) | string | `20` | no |
|
||||
| diskspace_timeframe | Monitor timeframe for RDS free diskspace [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_15m` | no |
|
||||
| environment | Architecture Environment | string | - | yes |
|
||||
| delay | Delay in seconds for the metric evaluation | string | `900` | no |
|
||||
| filter_tags_custom | Tags used for custom filtering when filter_tags_use_defaults is false | string | `*` | no |
|
||||
| filter_tags_use_defaults | Use default filter tags convention | string | `true` | no |
|
||||
| message | Message sent when an alert is triggered | string | - | yes |
|
||||
|
||||
@ -38,6 +38,12 @@ variable "cpu_message" {
|
||||
default = ""
|
||||
}
|
||||
|
||||
variable "cpu_timeframe" {
|
||||
description = "Monitor timeframe for RDS CPU usage [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]"
|
||||
type = "string"
|
||||
default = "last_15m"
|
||||
}
|
||||
|
||||
variable "cpu_threshold_warning" {
|
||||
description = "CPU usage in percent (warning threshold)"
|
||||
default = "80"
|
||||
@ -60,6 +66,12 @@ variable "diskspace_message" {
|
||||
default = ""
|
||||
}
|
||||
|
||||
variable "diskspace_timeframe" {
|
||||
description = "Monitor timeframe for RDS free diskspace [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]"
|
||||
type = "string"
|
||||
default = "last_15m"
|
||||
}
|
||||
|
||||
variable "diskspace_threshold_warning" {
|
||||
description = "Disk free space in percent (warning threshold)"
|
||||
default = "20"
|
||||
|
||||
@ -14,7 +14,7 @@ resource "datadog_monitor" "rds_cpu_90_15min" {
|
||||
type = "metric alert"
|
||||
|
||||
query = <<EOF
|
||||
avg(last_15m): (
|
||||
avg(${var.cpu_timeframe}): (
|
||||
avg:aws.rds.cpuutilization{${data.template_file.filter.rendered}} by {region,name}
|
||||
) > ${var.cpu_threshold_critical}
|
||||
EOF
|
||||
@ -46,7 +46,7 @@ resource "datadog_monitor" "rds_free_space_low" {
|
||||
type = "metric alert"
|
||||
|
||||
query = <<EOF
|
||||
avg(last_15m): (
|
||||
avg(${var.diskspace_timeframe}): (
|
||||
avg:aws.rds.free_storage_space{${data.template_file.filter.rendered}} by {region,name} /
|
||||
avg:aws.rds.total_storage_space{${data.template_file.filter.rendered}} by {region,name} * 100
|
||||
) < ${var.diskspace_threshold_critical}
|
||||
|
||||
@ -24,10 +24,11 @@ Inputs
|
||||
|
||||
| Name | Description | Type | Default | Required |
|
||||
|------|-------------|:----:|:-----:|:-----:|
|
||||
| environment | Architecture Environment | string | - | yes |
|
||||
| delay | Delay in seconds for the metric evaluation | string | `900` | no |
|
||||
| environment | Architecture Environment | string | - | yes |
|
||||
| filter_tags_custom | Tags used for custom filtering when filter_tags_use_defaults is false | string | `*` | no |
|
||||
| filter_tags_use_defaults | Use default filter tags convention | string | `true` | no |
|
||||
| message | Message sent when an alert is triggered | string | - | yes |
|
||||
| vpn_status_message | Custom message for VPN status monitor | string | `` | no |
|
||||
| vpn_status_silenced | Groups to mute for VPN status monitor | map | `<map>` | no |
|
||||
| vpn_status_timeframe | Monitor timeframe for VPN status [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no |
|
||||
|
||||
@ -35,3 +35,9 @@ variable "vpn_status_message" {
|
||||
type = "string"
|
||||
default = ""
|
||||
}
|
||||
|
||||
variable "vpn_status_timeframe" {
|
||||
description = "Monitor timeframe for VPN status [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]"
|
||||
type = "string"
|
||||
default = "last_5m"
|
||||
}
|
||||
|
||||
@ -11,7 +11,7 @@ resource "datadog_monitor" "VPN_status" {
|
||||
message = "${coalesce(var.vpn_status_message, var.message)}"
|
||||
|
||||
query = <<EOF
|
||||
avg(last_5m): (
|
||||
avg(${var.vpn_status_timeframe}): (
|
||||
avg:aws.vpn.tunnel_state{${data.template_file.filter.rendered}} by {region,name}
|
||||
) < 1
|
||||
EOF
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user