diff --git a/cloud/azure/azure-search/monitors-azure-search.tf b/cloud/azure/azure-search/monitors-azure-search.tf index b69605a..0dea51a 100644 --- a/cloud/azure/azure-search/monitors-azure-search.tf +++ b/cloud/azure/azure-search/monitors-azure-search.tf @@ -53,7 +53,7 @@ resource "datadog_monitor" "azure_search_throttled_queries_rate" { silenced = "${var.throttled_queries_rate_silenced}" - notify_no_data = false # Will notify when no data is received + notify_no_data = false # Will notify when no data is received renotify_interval = 0 require_full_window = false timeout_h = 0 diff --git a/scripts/90_best_practices.sh b/scripts/90_best_practices.sh new file mode 100755 index 0000000..12be77b --- /dev/null +++ b/scripts/90_best_practices.sh @@ -0,0 +1,14 @@ +#!/bin/bash +set -xueo pipefail + +source "$(dirname $0)/utils.sh" +goto_root + +# loop over every monitors set +for path in $(find "$(get_scope $1)" -path ./incubator -prune -o -name 'monitors-*.tf' -print | sort -fdbi); do + # check if there is more than 1 notify_no_data parameter set to true per set of monitors + if [[ $(grep -c notify_no_data.*true $path) -gt 1 ]]; then + echo "More than one notify_no_data set to true on $path" + exit 1 + fi +done