Merge branch 'MON-476_only_one_notify_no_data' into 'master'
MON-476 reduce no data alerts per set of monitors Closes MON-476 See merge request claranet/pt-monitoring/projects/datadog/terraform/monitors!67
This commit is contained in:
commit
6a919b07b5
@ -253,7 +253,7 @@ resource "datadog_monitor" "volume_space" {
|
||||
evaluation_delay = "${var.evaluation_delay}"
|
||||
new_host_delay = "${var.new_host_delay}"
|
||||
|
||||
notify_no_data = true
|
||||
notify_no_data = false
|
||||
renotify_interval = 0
|
||||
notify_audit = false
|
||||
timeout_h = 0
|
||||
@ -286,7 +286,7 @@ resource "datadog_monitor" "volume_inodes" {
|
||||
evaluation_delay = "${var.evaluation_delay}"
|
||||
new_host_delay = "${var.new_host_delay}"
|
||||
|
||||
notify_no_data = true
|
||||
notify_no_data = false
|
||||
renotify_interval = 0
|
||||
notify_audit = false
|
||||
timeout_h = 0
|
||||
|
||||
@ -57,7 +57,7 @@ resource "datadog_monitor" "es_free_space_low" {
|
||||
critical = "${var.diskspace_threshold_critical}"
|
||||
}
|
||||
|
||||
notify_no_data = true
|
||||
notify_no_data = false
|
||||
evaluation_delay = "${var.evaluation_delay}"
|
||||
renotify_interval = 0
|
||||
notify_audit = false
|
||||
@ -91,7 +91,7 @@ resource "datadog_monitor" "es_cpu_90_15min" {
|
||||
critical = "${var.cpu_threshold_critical}"
|
||||
}
|
||||
|
||||
notify_no_data = true
|
||||
notify_no_data = false
|
||||
evaluation_delay = "${var.evaluation_delay}"
|
||||
renotify_interval = 0
|
||||
notify_audit = false
|
||||
|
||||
@ -17,7 +17,7 @@ resource "datadog_monitor" "rds_cpu_90_15min" {
|
||||
critical = "${var.cpu_threshold_critical}"
|
||||
}
|
||||
|
||||
notify_no_data = true
|
||||
notify_no_data = false
|
||||
evaluation_delay = "${var.evaluation_delay}"
|
||||
notify_audit = false
|
||||
timeout_h = 0
|
||||
@ -84,7 +84,7 @@ resource "datadog_monitor" "rds_replica_lag" {
|
||||
critical = "${var.replicalag_threshold_critical}"
|
||||
}
|
||||
|
||||
notify_no_data = true
|
||||
notify_no_data = false
|
||||
evaluation_delay = "${var.evaluation_delay}"
|
||||
notify_audit = false
|
||||
timeout_h = 0
|
||||
|
||||
@ -21,7 +21,7 @@ resource "datadog_monitor" "azure_search_latency" {
|
||||
|
||||
silenced = "${var.latency_silenced}"
|
||||
|
||||
notify_no_data = true # Will notify when no data is received
|
||||
notify_no_data = true # Will not notify when no data is received
|
||||
renotify_interval = 0
|
||||
require_full_window = false
|
||||
timeout_h = 0
|
||||
@ -53,7 +53,7 @@ resource "datadog_monitor" "azure_search_throttled_queries_rate" {
|
||||
|
||||
silenced = "${var.throttled_queries_rate_silenced}"
|
||||
|
||||
notify_no_data = true # 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
|
||||
|
||||
@ -21,7 +21,7 @@ resource "datadog_monitor" "too_many_jobs_failed" {
|
||||
|
||||
silenced = "${var.failed_jobs_rate_silenced}"
|
||||
|
||||
notify_no_data = true
|
||||
notify_no_data = false
|
||||
evaluation_delay = "${var.evaluation_delay}"
|
||||
renotify_interval = 0
|
||||
notify_audit = false
|
||||
@ -57,7 +57,7 @@ resource "datadog_monitor" "too_many_list_jobs_failed" {
|
||||
|
||||
silenced = "${var.failed_listjobs_rate_silenced}"
|
||||
|
||||
notify_no_data = true
|
||||
notify_no_data = false
|
||||
evaluation_delay = "${var.evaluation_delay}"
|
||||
renotify_interval = 0
|
||||
notify_audit = false
|
||||
@ -93,7 +93,7 @@ resource "datadog_monitor" "too_many_query_jobs_failed" {
|
||||
|
||||
silenced = "${var.failed_queryjobs_rate_silenced}"
|
||||
|
||||
notify_no_data = true
|
||||
notify_no_data = false
|
||||
evaluation_delay = "${var.evaluation_delay}"
|
||||
renotify_interval = 0
|
||||
notify_audit = false
|
||||
@ -149,7 +149,7 @@ resource "datadog_monitor" "total_devices" {
|
||||
|
||||
silenced = "${var.total_devices_silenced}"
|
||||
|
||||
notify_no_data = true
|
||||
notify_no_data = false
|
||||
evaluation_delay = "${var.evaluation_delay}"
|
||||
renotify_interval = 0
|
||||
notify_audit = false
|
||||
@ -185,7 +185,7 @@ resource "datadog_monitor" "too_many_c2d_methods_failed" {
|
||||
|
||||
silenced = "${var.failed_c2d_methods_rate_silenced}"
|
||||
|
||||
notify_no_data = true
|
||||
notify_no_data = false
|
||||
evaluation_delay = "${var.evaluation_delay}"
|
||||
renotify_interval = 0
|
||||
notify_audit = false
|
||||
@ -221,7 +221,7 @@ resource "datadog_monitor" "too_many_c2d_twin_read_failed" {
|
||||
|
||||
silenced = "${var.failed_c2d_twin_read_rate_silenced}"
|
||||
|
||||
notify_no_data = true
|
||||
notify_no_data = false
|
||||
evaluation_delay = "${var.evaluation_delay}"
|
||||
renotify_interval = 0
|
||||
notify_audit = false
|
||||
@ -257,7 +257,7 @@ resource "datadog_monitor" "too_many_c2d_twin_update_failed" {
|
||||
|
||||
silenced = "${var.failed_c2d_twin_update_rate_silenced}"
|
||||
|
||||
notify_no_data = true
|
||||
notify_no_data = false
|
||||
evaluation_delay = "${var.evaluation_delay}"
|
||||
renotify_interval = 0
|
||||
notify_audit = false
|
||||
@ -293,7 +293,7 @@ resource "datadog_monitor" "too_many_d2c_twin_read_failed" {
|
||||
|
||||
silenced = "${var.failed_d2c_twin_read_rate_silenced}"
|
||||
|
||||
notify_no_data = true
|
||||
notify_no_data = false
|
||||
evaluation_delay = "${var.evaluation_delay}"
|
||||
renotify_interval = 0
|
||||
notify_audit = false
|
||||
@ -329,7 +329,7 @@ resource "datadog_monitor" "too_many_d2c_twin_update_failed" {
|
||||
|
||||
silenced = "${var.failed_d2c_twin_update_rate_silenced}"
|
||||
|
||||
notify_no_data = true
|
||||
notify_no_data = false
|
||||
evaluation_delay = "${var.evaluation_delay}"
|
||||
renotify_interval = 0
|
||||
notify_audit = false
|
||||
@ -367,7 +367,7 @@ resource "datadog_monitor" "too_many_d2c_telemetry_egress_dropped" {
|
||||
|
||||
silenced = "${var.dropped_d2c_telemetry_egress_silenced}"
|
||||
|
||||
notify_no_data = true
|
||||
notify_no_data = false
|
||||
evaluation_delay = "${var.evaluation_delay}"
|
||||
renotify_interval = 0
|
||||
notify_audit = false
|
||||
@ -405,7 +405,7 @@ resource "datadog_monitor" "too_many_d2c_telemetry_egress_orphaned" {
|
||||
|
||||
silenced = "${var.orphaned_d2c_telemetry_egress_silenced}"
|
||||
|
||||
notify_no_data = true
|
||||
notify_no_data = false
|
||||
evaluation_delay = "${var.evaluation_delay}"
|
||||
renotify_interval = 0
|
||||
notify_audit = false
|
||||
@ -443,7 +443,7 @@ resource "datadog_monitor" "too_many_d2c_telemetry_egress_invalid" {
|
||||
|
||||
silenced = "${var.invalid_d2c_telemetry_egress_silenced}"
|
||||
|
||||
notify_no_data = true
|
||||
notify_no_data = false
|
||||
evaluation_delay = "${var.evaluation_delay}"
|
||||
renotify_interval = 0
|
||||
notify_audit = false
|
||||
@ -473,7 +473,7 @@ resource "datadog_monitor" "too_many_d2c_telemetry_ingress_nosent" {
|
||||
|
||||
silenced = "${var.too_many_d2c_telemetry_ingress_nosent_silenced}"
|
||||
|
||||
notify_no_data = true
|
||||
notify_no_data = false
|
||||
evaluation_delay = "${var.evaluation_delay}"
|
||||
renotify_interval = 0
|
||||
notify_audit = false
|
||||
|
||||
@ -25,7 +25,7 @@ resource "datadog_monitor" "cpu_utilization" {
|
||||
timeout_h = 0
|
||||
include_tags = true
|
||||
require_full_window = false
|
||||
notify_no_data = true
|
||||
notify_no_data = false
|
||||
renotify_interval = 0
|
||||
|
||||
evaluation_delay = "${var.evaluation_delay}"
|
||||
@ -145,7 +145,7 @@ resource "datadog_monitor" "memory_utilization" {
|
||||
timeout_h = 0
|
||||
include_tags = true
|
||||
require_full_window = false
|
||||
notify_no_data = true
|
||||
notify_no_data = false
|
||||
renotify_interval = 0
|
||||
|
||||
evaluation_delay = "${var.evaluation_delay}"
|
||||
@ -226,7 +226,7 @@ resource "datadog_monitor" "failover_unavailable" {
|
||||
timeout_h = 0
|
||||
include_tags = true
|
||||
require_full_window = false
|
||||
notify_no_data = true
|
||||
notify_no_data = false
|
||||
renotify_interval = 0
|
||||
|
||||
evaluation_delay = "${var.evaluation_delay}"
|
||||
|
||||
@ -60,7 +60,7 @@ resource "datadog_monitor" "unavailable_sending_operations_count" {
|
||||
timeout_h = 0
|
||||
include_tags = true
|
||||
require_full_window = false
|
||||
notify_no_data = true
|
||||
notify_no_data = false
|
||||
renotify_interval = 0
|
||||
|
||||
evaluation_delay = "${var.evaluation_delay}"
|
||||
|
||||
14
scripts/90_best_practices.sh
Executable file
14
scripts/90_best_practices.sh
Executable file
@ -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
|
||||
Loading…
x
Reference in New Issue
Block a user