Sfoglia il codice sorgente

Moves Sensu DNS Timeouts to a Global Var

Greatly increased to reduce notifications

To be tagged v1.20.7
Fred Damstra 4 anni fa
parent
commit
fde90a9f08
2 ha cambiato i file con 3 aggiunte e 2 eliminazioni
  1. 2 2
      base/sensu-configuration/checks.tf
  2. 1 0
      base/sensu-configuration/vars.tf

+ 2 - 2
base/sensu-configuration/checks.tf

@@ -25,7 +25,7 @@ locals {
 resource "sensu_check" "check_dns_all" {
   for_each       = local.dns_checks_all
   name           = "check_dns_${ each.key }"
-  command        = "check_dns --hostname=${ each.key } --expected-address=${ each.value } --warning=0.5  --critical=5"
+  command        = "check_dns --hostname=${ each.key } --expected-address=${ each.value } --warning=${ var.sensu_checks["dns"]["warning"] }  --critical=${ var.sensu_checks["dns"]["critical"] }"
   namespace      = "default"
   subscriptions  = [ "linux", ]
   handlers       = [ "victorops", "logfile", ]
@@ -37,7 +37,7 @@ resource "sensu_check" "check_dns_all" {
 resource "sensu_check" "check_dns_private" {
   for_each       = local.dns_checks_private
   name           = "check_dns_${ each.key }"
-  command        = "check_dns --hostname=${ each.key } --expected-address=${ each.value } --warning=0.5  --critical=5"
+  command        = "check_dns --hostname=${ each.key } --expected-address=${ each.value } --warning=${ var.sensu_checks["dns"]["warning"] }  --critical=${ var.sensu_checks["dns"]["critical"] }"
   namespace      = "default"
   subscriptions  = [ "private_dns_client", ]
   handlers       = [ "victorops", "logfile", ]

+ 1 - 0
base/sensu-configuration/vars.tf

@@ -1,2 +1,3 @@
+variable "sensu_checks" { type = map }
 variable "dns_info" { type = map }
 variable "environment" { type = string }