|
@@ -17,6 +17,8 @@ locals {
|
|
|
"10.10.10.10": "dnstest.pvt.xdr.accenturefederalcyber.com.",
|
|
|
}
|
|
|
|
|
|
+ default_handlers = var.environment == "test" ? ["logfile"] : [ "victorops", "logfile" ]
|
|
|
+
|
|
|
# To ensure this list is complete:
|
|
|
# salt \* grains.get partitions | grep "^ /" | sort | uniq | grep -v snap
|
|
|
disk_thresholds = {
|
|
@@ -51,7 +53,7 @@ resource "sensu_check" "check_dns_all" {
|
|
|
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", ]
|
|
|
+ handlers = local.default_handlers
|
|
|
interval = 60
|
|
|
publish = "true"
|
|
|
runtime_assets = [ "sensu-plugins-monitoring", ]
|
|
@@ -63,7 +65,7 @@ resource "sensu_check" "check_dns_private" {
|
|
|
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", ]
|
|
|
+ handlers = local.default_handlers
|
|
|
interval = 60
|
|
|
publish = "true"
|
|
|
runtime_assets = [ "sensu-plugins-monitoring", ]
|
|
@@ -77,7 +79,7 @@ resource "sensu_check" "check_disks_all" {
|
|
|
command = "check_disk -c 20% -A --ignore-eregi-path '/snap/' --ignore-eregi-path '/opt/docker/.*' --ignore-eregi-path '/(sys|proc)/'"
|
|
|
namespace = "default"
|
|
|
subscriptions = [ "check_disk_all" ]
|
|
|
- handlers = [ "victorops", "logfile", ]
|
|
|
+ handlers = local.default_handlers
|
|
|
interval = 300
|
|
|
publish = "true"
|
|
|
runtime_assets = [ "sensu-plugins-monitoring", ]
|
|
@@ -91,7 +93,7 @@ resource "sensu_check" "check_disks" {
|
|
|
command = "check_disk -c ${ each.value } -p ${ replace(each.key, "root", "/") }"
|
|
|
namespace = "default"
|
|
|
subscriptions = [ "check_disk${ replace(each.key, "/", "_") }" ]
|
|
|
- handlers = [ "victorops", "logfile", ]
|
|
|
+ handlers = local.default_handlers
|
|
|
interval = 300
|
|
|
publish = "true"
|
|
|
runtime_assets = [ "sensu-plugins-monitoring", ]
|
|
@@ -103,7 +105,7 @@ resource "sensu_check" "check_disks" {
|
|
|
# command = "check_ping -H ${each.value} -w 500,80% -c 500,80% -4"
|
|
|
# namespace = "default"
|
|
|
# subscriptions = [ "interconnect-0", ]
|
|
|
-# handlers = [ "victorops", "logfile", ]
|
|
|
+# handlers = local.default_handlers
|
|
|
# interval = 60
|
|
|
# publish = "true"
|
|
|
# runtime_assets = [ "sensu-plugins-monitoring", ]
|
|
@@ -115,7 +117,7 @@ resource "sensu_check" "check_disks" {
|
|
|
# command = "check_ping -H ${each.value} -w 500,80% -c 500,80% -4"
|
|
|
# namespace = "default"
|
|
|
# subscriptions = [ "interconnect-1", ]
|
|
|
-# handlers = [ "victorops", "logfile", ]
|
|
|
+# handlers = local.default_handlers
|
|
|
# interval = 60
|
|
|
# publish = "true"
|
|
|
# runtime_assets = [ "sensu-plugins-monitoring", ]
|
|
@@ -126,7 +128,7 @@ resource "sensu_check" "check_phantom_ports" {
|
|
|
command = "check-ports.rb -h 0.0.0.0 -p 443"
|
|
|
namespace = "default"
|
|
|
subscriptions = [ "phantom_ports", ]
|
|
|
- handlers = [ "victorops", "logfile", ]
|
|
|
+ handlers = local.default_handlers
|
|
|
interval = 60
|
|
|
publish = "true"
|
|
|
runtime_assets = [ "sensu-plugins-network-checks", "sensu-ruby-runtime", ]
|
|
@@ -137,7 +139,7 @@ resource "sensu_check" "check_portal_http" {
|
|
|
command = "check-http.rb -u https://portal.${var.dns_info["public"]["zone"]}/api/health/ --response-code 200"
|
|
|
namespace = "default"
|
|
|
subscriptions = [ "portal", ]
|
|
|
- handlers = [ "victorops", "logfile", ]
|
|
|
+ handlers = local.default_handlers
|
|
|
interval = 60
|
|
|
publish = "true"
|
|
|
runtime_assets = [ "sensu-plugins-http", "sensu-ruby-runtime", ]
|
|
@@ -148,7 +150,7 @@ resource "sensu_check" "check_salt_master_ports" {
|
|
|
command = "check-ports.rb -h 0.0.0.0 -p 4505,4506"
|
|
|
namespace = "default"
|
|
|
subscriptions = [ "salt_master_ports", ]
|
|
|
- handlers = [ "victorops", "logfile", ]
|
|
|
+ handlers = local.default_handlers
|
|
|
interval = 60
|
|
|
publish = "true"
|
|
|
runtime_assets = [ "sensu-plugins-network-checks", "sensu-ruby-runtime", ]
|
|
@@ -159,7 +161,7 @@ resource "sensu_check" "check_splunk_cm_ports" {
|
|
|
command = "check-ports.rb -h 0.0.0.0 -p 8089"
|
|
|
namespace = "default"
|
|
|
subscriptions = [ "splunk_cm_ports", ]
|
|
|
- handlers = [ "victorops", "logfile", ]
|
|
|
+ handlers = local.default_handlers
|
|
|
interval = 60
|
|
|
publish = "true"
|
|
|
runtime_assets = [ "sensu-plugins-network-checks", "sensu-ruby-runtime", ]
|
|
@@ -170,7 +172,7 @@ resource "sensu_check" "check_splunk_ds_ports" {
|
|
|
command = "check-ports.rb -h 0.0.0.0 -p 8089"
|
|
|
namespace = "default"
|
|
|
subscriptions = [ "splunk_ds_ports", ]
|
|
|
- handlers = [ "victorops", "logfile", ]
|
|
|
+ handlers = local.default_handlers
|
|
|
interval = 60
|
|
|
publish = "true"
|
|
|
runtime_assets = [ "sensu-plugins-network-checks", "sensu-ruby-runtime", ]
|
|
@@ -181,7 +183,7 @@ resource "sensu_check" "check_splunk_hf_ports" {
|
|
|
command = "check-ports.rb -h 0.0.0.0 -p 8089,8000"
|
|
|
namespace = "default"
|
|
|
subscriptions = [ "splunk_hf_ports", ]
|
|
|
- handlers = [ "victorops", "logfile", ]
|
|
|
+ handlers = local.default_handlers
|
|
|
interval = 60
|
|
|
publish = "true"
|
|
|
runtime_assets = [ "sensu-plugins-network-checks", "sensu-ruby-runtime", ]
|
|
@@ -192,7 +194,7 @@ resource "sensu_check" "check_splunk_indexer_ports_moose" {
|
|
|
command = "check-ports.rb -h 0.0.0.0 -p 8089,9998,9887,8088"
|
|
|
namespace = "default"
|
|
|
subscriptions = [ "splunk_indexer_ports_moose", ]
|
|
|
- handlers = [ "victorops", "logfile", ]
|
|
|
+ handlers = local.default_handlers
|
|
|
interval = 60
|
|
|
publish = "true"
|
|
|
runtime_assets = [ "sensu-plugins-network-checks", "sensu-ruby-runtime", ]
|
|
@@ -203,7 +205,7 @@ resource "sensu_check" "check_splunk_indexer_ports" {
|
|
|
command = "check-ports.rb -h 0.0.0.0 -p 8089,9998,9887"
|
|
|
namespace = "default"
|
|
|
subscriptions = [ "splunk_indexer_ports", ]
|
|
|
- handlers = [ "victorops", "logfile", ]
|
|
|
+ handlers = local.default_handlers
|
|
|
interval = 60
|
|
|
publish = "true"
|
|
|
runtime_assets = [ "sensu-plugins-network-checks", "sensu-ruby-runtime", ]
|
|
@@ -214,7 +216,7 @@ resource "sensu_check" "check_splunk_sh_ports" {
|
|
|
command = "check-ports.rb -h 0.0.0.0 -p 8089,8000"
|
|
|
namespace = "default"
|
|
|
subscriptions = [ "splunk_sh_ports", ]
|
|
|
- handlers = [ "victorops", "logfile", ]
|
|
|
+ handlers = local.default_handlers
|
|
|
interval = 60
|
|
|
publish = "true"
|
|
|
runtime_assets = [ "sensu-plugins-network-checks", "sensu-ruby-runtime", ]
|
|
@@ -225,7 +227,7 @@ resource "sensu_check" "check_splunk_uf_ports" {
|
|
|
command = "check-ports.rb -h 0.0.0.0 -p 8089"
|
|
|
namespace = "default"
|
|
|
subscriptions = [ "splunk", ]
|
|
|
- handlers = [ "victorops", "logfile", ]
|
|
|
+ handlers = local.default_handlers
|
|
|
interval = 60
|
|
|
publish = "true"
|
|
|
runtime_assets = [ "sensu-plugins-network-checks", "sensu-ruby-runtime", ]
|
|
@@ -236,7 +238,7 @@ resource "sensu_check" "check_syslog-ng_service" {
|
|
|
command = "check-process.rb -p syslog-ng"
|
|
|
namespace = "default"
|
|
|
subscriptions = [ "syslog-ng_service", ]
|
|
|
- handlers = [ "victorops", "logfile", ]
|
|
|
+ handlers = local.default_handlers
|
|
|
interval = 60
|
|
|
publish = "true"
|
|
|
runtime_assets = [ "sensu-plugins-process-checks", "sensu-ruby-runtime", ]
|
|
@@ -247,7 +249,7 @@ resource "sensu_check" "check_salt-minion_service" {
|
|
|
command = "check-process.rb -p salt-minion --critical-under 1 --critical-over 5"
|
|
|
namespace = "default"
|
|
|
subscriptions = [ "salt-minion_service", ]
|
|
|
- handlers = [ "victorops", "logfile", ]
|
|
|
+ handlers = local.default_handlers
|
|
|
interval = 60
|
|
|
publish = "true"
|
|
|
runtime_assets = [ "sensu-plugins-process-checks", "sensu-ruby-runtime", ]
|
|
@@ -260,7 +262,7 @@ resource "sensu_check" "check_splunk_service" {
|
|
|
command = "check-process.rb -p 'splunkd -p' --user splunk -C 2"
|
|
|
namespace = "default"
|
|
|
subscriptions = [ "splunk_service", ]
|
|
|
- handlers = [ "victorops", "logfile", ]
|
|
|
+ handlers = local.default_handlers
|
|
|
interval = 60
|
|
|
publish = "true"
|
|
|
runtime_assets = [ "sensu-plugins-process-checks", "sensu-ruby-runtime", ]
|