MON-390 Monitors for Azure Functions - fix thresholds & dimensions

This commit is contained in:
Laurent Piroelle 2019-04-05 14:02:14 +02:00
parent 2d83e4ab0f
commit 2db917228f
4 changed files with 7 additions and 35 deletions

View File

@ -32,13 +32,12 @@ Creates DataDog monitors with the following checks:
| filter\_tags\_custom | Tags used for custom filtering when filter_tags_use_defaults is false | string | `"*"` | no |
| filter\_tags\_custom\_excluded | Tags excluded for custom filtering when filter_tags_use_defaults is false | string | `""` | no |
| filter\_tags\_use\_defaults | Use default filter tags convention | string | `"true"` | no |
| functions\_max\_scale\_count | Maximum number of Function instances | string | n/a | yes |
| high\_connections\_count\_enabled | Flag to enable Functions high connections count monitor | string | `"true"` | no |
| high\_connections\_count\_extra\_tags | Extra tags for Functions high connections count monitor | list | `[]` | no |
| high\_connections\_count\_message | Custom message for Functions high connections count monitor | string | `""` | no |
| high\_connections\_count\_silenced | Groups to mute for Functions high connections count monitor | map | `{}` | no |
| high\_connections\_count\_threshold\_critical | Alerting threshold for Functions high connections count | string | `"290"` | no |
| high\_connections\_count\_threshold\_warning | Warning threshold for Functions high connections count | string | `"250"` | no |
| high\_connections\_count\_threshold\_critical | Alerting threshold for Functions high connections count | string | `"590"` | no |
| high\_connections\_count\_threshold\_warning | Warning threshold for Functions high connections count | string | `"550"` | no |
| high\_connections\_count\_time\_aggregator | Monitor aggregator for Functions high connections count [available values: min, max or avg] | string | `"min"` | no |
| high\_connections\_count\_timeframe | Monitor timeframe for Functions high connections count [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `"last_5m"` | no |
| high\_threads\_count\_enabled | Flag to enable Functions high threads count monitor | string | `"true"` | no |

View File

@ -32,10 +32,6 @@ variable "new_host_delay" {
default = 300
}
variable "functions_max_scale_count" {
description = "Maximum number of Function instances"
}
# Azure Function App specific variables
variable "http_5xx_errors_rate_silenced" {
description = "Groups to mute for Functions Http 5xx errors rate monitor"
@ -120,12 +116,12 @@ variable "high_connections_count_timeframe" {
}
variable "high_connections_count_threshold_critical" {
default = 290
default = 590
description = "Alerting threshold for Functions high connections count"
}
variable "high_connections_count_threshold_warning" {
default = 250
default = 550
description = "Warning threshold for Functions high connections count"
}

View File

@ -1,23 +0,0 @@
azure.functions.average_memory_working_set
azure.functions.bytes_received
azure.functions.bytes_sent
azure.functions.connections
azure.functions.current_assemblies
azure.functions.function_execution_count
azure.functions.function_execution_units
azure.functions.gen_0_garbage_collections
azure.functions.gen_1_garbage_collections
azure.functions.gen_2_garbage_collections
azure.functions.handle_count
azure.functions.http5xx
azure.functions.io_other_bytes_per_second
azure.functions.io_other_operations_per_second
azure.functions.io_read_bytes_per_second
azure.functions.io_read_operations_per_second
azure.functions.io_write_bytes_per_second
azure.functions.io_write_operations_per_second
azure.functions.memory_working_set
azure.functions.private_bytes
azure.functions.thread_count
azure.functions.total_app_domains
azure.functions.total_app_domains_unloaded

View File

@ -38,7 +38,7 @@ resource "datadog_monitor" "function_high_connections_count" {
query = <<EOF
${var.high_connections_count_time_aggregator}(${var.high_connections_count_timeframe}):
default(azure.functions.connections${module.filter-tags.query_alert} by {resource_group,region,name}.as_rate(), 0) / ${var.functions_max_scale_count}
default(azure.functions.connections${module.filter-tags.query_alert} by {resource_group,region,name,instance}.as_rate(), 0)
> ${var.high_connections_count_threshold_critical}
EOF
@ -69,7 +69,7 @@ resource "datadog_monitor" "function_high_threads_count" {
query = <<EOF
${var.high_threads_count_time_aggregator}(${var.high_threads_count_timeframe}):
default(azure.functions.thread_count${module.filter-tags.query_alert} by {resource_group,region,name}.as_rate(), 0) / ${var.functions_max_scale_count}
default(azure.functions.thread_count${module.filter-tags.query_alert} by {resource_group,region,name,instance}.as_rate(), 0)
> ${var.high_threads_count_threshold_critical}
EOF
@ -100,7 +100,7 @@ resource "datadog_monitor" "function_memory_usage" {
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}
avg:azure.functions.average_memory_working_set${module.filter-tags.query_alert} by {resource_group,region,name,instance}
) > ${var.memory_usage_threshold_critical}
EOF