MON-390 Remove memory related monitor
This commit is contained in:
parent
2db917228f
commit
a087ecd5c5
@ -20,7 +20,6 @@ Creates DataDog monitors with the following checks:
|
|||||||
|
|
||||||
- Function App connections count too high
|
- Function App connections count too high
|
||||||
- Function App HTTP 5xx errors too high
|
- Function App HTTP 5xx errors too high
|
||||||
- Function App memory usage too high
|
|
||||||
- Function App threads count too high
|
- Function App threads count too high
|
||||||
|
|
||||||
## Inputs
|
## Inputs
|
||||||
@ -56,14 +55,6 @@ Creates DataDog monitors with the following checks:
|
|||||||
| http\_5xx\_errors\_rate\_threshold\_warning | Warning threshold for Functions Http 5xx errors rate | string | `"10"` | no |
|
| http\_5xx\_errors\_rate\_threshold\_warning | Warning threshold for Functions Http 5xx errors rate | string | `"10"` | no |
|
||||||
| http\_5xx\_errors\_rate\_time\_aggregator | Monitor aggregator for Functions Http 5xx errors rate [available values: min, max or avg] | string | `"min"` | no |
|
| http\_5xx\_errors\_rate\_time\_aggregator | Monitor aggregator for Functions Http 5xx errors rate [available values: min, max or avg] | string | `"min"` | no |
|
||||||
| http\_5xx\_errors\_rate\_timeframe | Monitor timeframe for Functions Http 5xx errors rate [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\_errors\_rate\_timeframe | Monitor timeframe for Functions Http 5xx errors rate [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `"last_5m"` | no |
|
||||||
| memory\_usage\_enabled | Flag to enable Functions memory usage monitor | string | `"true"` | no |
|
|
||||||
| memory\_usage\_extra\_tags | Extra tags for Functions memory usage monitor | list | `[]` | no |
|
|
||||||
| memory\_usage\_message | Custom message for Functions memory usage monitor | string | `""` | no |
|
|
||||||
| memory\_usage\_silenced | Groups to mute for Functions memory usage monitor | map | `{}` | no |
|
|
||||||
| memory\_usage\_threshold\_critical | Alerting threshold for Functions memory usage in bytes | string | `"125829120"` | no |
|
|
||||||
| memory\_usage\_threshold\_warning | Warning threshold for Functions memory usage in bytes | string | `"104857600"` | no |
|
|
||||||
| memory\_usage\_time\_aggregator | Monitor aggregator for Functions memory usage [available values: min, max or avg] | string | `"min"` | no |
|
|
||||||
| memory\_usage\_timeframe | Monitor timeframe for Functions memory usage [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 | n/a | yes |
|
| message | Message sent when a monitor is triggered | string | n/a | yes |
|
||||||
| 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 |
|
||||||
|
|
||||||
@ -74,7 +65,6 @@ Creates DataDog monitors with the following checks:
|
|||||||
| function\_high\_connections\_count\_id | id for monitor function_high_connections_count |
|
| function\_high\_connections\_count\_id | id for monitor function_high_connections_count |
|
||||||
| function\_high\_threads\_count\_id | id for monitor function_high_threads_count |
|
| function\_high\_threads\_count\_id | id for monitor function_high_threads_count |
|
||||||
| function\_http\_5xx\_errors\_rate\_id | id for monitor function_http_5xx_errors_rate |
|
| function\_http\_5xx\_errors\_rate\_id | id for monitor function_http_5xx_errors_rate |
|
||||||
| function\_memory\_usage\_id | id for monitor function_memory_usage |
|
|
||||||
|
|
||||||
## Related documentation
|
## Related documentation
|
||||||
|
|
||||||
|
|||||||
@ -170,49 +170,3 @@ variable "high_threads_count_threshold_warning" {
|
|||||||
default = 490
|
default = 490
|
||||||
description = "Warning threshold for Functions high threads count"
|
description = "Warning threshold for Functions high threads count"
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "memory_usage_silenced" {
|
|
||||||
description = "Groups to mute for Functions memory usage monitor"
|
|
||||||
type = "map"
|
|
||||||
default = {}
|
|
||||||
}
|
|
||||||
|
|
||||||
variable "memory_usage_enabled" {
|
|
||||||
description = "Flag to enable Functions memory usage monitor"
|
|
||||||
type = "string"
|
|
||||||
default = "true"
|
|
||||||
}
|
|
||||||
|
|
||||||
variable "memory_usage_extra_tags" {
|
|
||||||
description = "Extra tags for Functions memory usage monitor"
|
|
||||||
type = "list"
|
|
||||||
default = []
|
|
||||||
}
|
|
||||||
|
|
||||||
variable "memory_usage_message" {
|
|
||||||
description = "Custom message for Functions memory usage monitor"
|
|
||||||
type = "string"
|
|
||||||
default = ""
|
|
||||||
}
|
|
||||||
|
|
||||||
variable "memory_usage_time_aggregator" {
|
|
||||||
description = "Monitor aggregator for Functions memory usage [available values: min, max or avg]"
|
|
||||||
type = "string"
|
|
||||||
default = "min"
|
|
||||||
}
|
|
||||||
|
|
||||||
variable "memory_usage_timeframe" {
|
|
||||||
description = "Monitor timeframe for Functions memory usage [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 "memory_usage_threshold_critical" {
|
|
||||||
default = 125829120 # 120Mb
|
|
||||||
description = "Alerting threshold for Functions memory usage in bytes"
|
|
||||||
}
|
|
||||||
|
|
||||||
variable "memory_usage_threshold_warning" {
|
|
||||||
default = 104857600 # 100Mb
|
|
||||||
description = "Warning threshold for Functions memory usage in bytes"
|
|
||||||
}
|
|
||||||
|
|||||||
@ -91,34 +91,3 @@ resource "datadog_monitor" "function_high_threads_count" {
|
|||||||
|
|
||||||
tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:azure_functions", "team:claranet", "created-by:terraform", "${var.high_threads_count_extra_tags}"]
|
tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:azure_functions", "team:claranet", "created-by:terraform", "${var.high_threads_count_extra_tags}"]
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "datadog_monitor" "function_memory_usage" {
|
|
||||||
count = "${var.memory_usage_enabled ? 1 : 0}"
|
|
||||||
name = "[${var.environment}] Function App memory usage too high {{#is_alert}}{{{comparator}}} {{threshold}} ({{value}}){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}} ({{value}}){{/is_warning}}"
|
|
||||||
type = "metric alert"
|
|
||||||
message = "${coalesce(var.memory_usage_message, var.message)}"
|
|
||||||
|
|
||||||
query = <<EOF
|
|
||||||
${var.memory_usage_time_aggregator}(${var.memory_usage_timeframe}): (
|
|
||||||
avg:azure.functions.average_memory_working_set${module.filter-tags.query_alert} by {resource_group,region,name,instance}
|
|
||||||
) > ${var.memory_usage_threshold_critical}
|
|
||||||
EOF
|
|
||||||
|
|
||||||
evaluation_delay = "${var.evaluation_delay}"
|
|
||||||
new_host_delay = "${var.new_host_delay}"
|
|
||||||
|
|
||||||
thresholds {
|
|
||||||
warning = "${var.memory_usage_threshold_warning}"
|
|
||||||
critical = "${var.memory_usage_threshold_critical}"
|
|
||||||
}
|
|
||||||
|
|
||||||
silenced = "${var.memory_usage_silenced}"
|
|
||||||
|
|
||||||
notify_no_data = false
|
|
||||||
renotify_interval = 0
|
|
||||||
require_full_window = false
|
|
||||||
timeout_h = 0
|
|
||||||
include_tags = true
|
|
||||||
|
|
||||||
tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:azure_functions", "team:claranet", "created-by:terraform", "${var.memory_usage_extra_tags}"]
|
|
||||||
}
|
|
||||||
|
|||||||
@ -12,8 +12,3 @@ output "function_high_threads_count_id" {
|
|||||||
description = "id for monitor function_high_threads_count"
|
description = "id for monitor function_high_threads_count"
|
||||||
value = "${datadog_monitor.function_high_threads_count.*.id}"
|
value = "${datadog_monitor.function_high_threads_count.*.id}"
|
||||||
}
|
}
|
||||||
|
|
||||||
output "function_memory_usage_id" {
|
|
||||||
description = "id for monitor function_memory_usage"
|
|
||||||
value = "${datadog_monitor.function_memory_usage.*.id}"
|
|
||||||
}
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user