CLOUD AZURE FUNCTIONS DataDog monitors

How to use this module

module "datadog-monitors-cloud-azure-functions" {
  source = "git::ssh://git@git.fr.clara.net/claranet/cloudnative/projects/datadog/terraform/monitors.git//cloud/azure/functions?ref={revision}"

  environment = "${var.environment}"
  message     = "${module.datadog-message-alerting.alerting-message}"
  
  functions_max_scale_count = 2
}

Purpose

Creates DataDog monitors with the following checks:

  • Function App connections count too high
  • Function App HTTP 5xx errors too high
  • Function App memory usage too high
  • Function App threads count too high

Inputs

Name Description Type Default Required
environment Architecture environment string n/a yes
evaluation_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_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
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 "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
high_threads_count_extra_tags Extra tags for Functions high threads count monitor list [] no
high_threads_count_message Custom message for Functions high threads count monitor string "" no
high_threads_count_silenced Groups to mute for Functions high threads count monitor map {} no
high_threads_count_threshold_critical Alerting threshold for Functions high threads count string "510" no
high_threads_count_threshold_warning Warning threshold for Functions high threads count string "490" no
high_threads_count_time_aggregator Monitor aggregator for Functions high threads count [available values: min, max or avg] string "min" no
high_threads_count_timeframe Monitor timeframe for Functions high threads count [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_enabled Flag to enable Functions Http 5xx errors rate monitor string "true" no
http_5xx_errors_rate_extra_tags Extra tags for Functions Http 5xx errors rate monitor list [] no
http_5xx_errors_rate_message Custom message for Functions Http 5xx errors rate monitor string "" no
http_5xx_errors_rate_silenced Groups to mute for Functions Http 5xx errors rate monitor map {} no
http_5xx_errors_rate_threshold_critical Alerting threshold for Functions Http 5xx errors rate string "20" 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_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
new_host_delay Delay in seconds before monitor new resource string "300" no

Outputs

Name Description
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_http_5xx_errors_rate_id id for monitor function_http_5xx_errors_rate
function_memory_usage_id id for monitor function_memory_usage

Datadog Azure documentation: https://docs.datadoghq.com/integrations/azure/

Azure Monitor metrics: https://docs.microsoft.com/en-us/azure/azure-monitor/platform/metrics-supported#microsoftwebsites-functions

Azure Functions connections limits: https://docs.microsoft.com/en-us/azure/azure-functions/manage-connections#connections-limit