terraform-provider-signalform
terraform-provider-signalform copied to clipboard
Detector fails to link Slack notification silently
The Slack notification is silently failing. The Pagerduty one is linked but the Slack one is not linked when I look at them in the SignalFX UI.
This is the code that I have that creates the detectors.
resource "signalform_detector" "site_capacity" {
provider = "signalform"
count = "${length(var.regions)}"
name = "${var.regions[count.index]} stack capacity"
max_delay = 30
description = "Alerts when stack capacity in a region is full"
program_text = <<-EOF
[.....]
detect("Site Capacity @ 95%", when(site_count > site_capacity * 0.95, lasting='5s'))
detect("Site Capacity @ 90%", when(site_count > site_capacity * 0.90, lasting='5s'))
EOF
rule {
description = "active when site count exceeds 95% site capacity"
severity = "Critical"
detect_label = "Site Capacity @ 95%"
notifications = ["PagerDuty,RedactedId"]
}
rule {
description = "active when site count exceeds 90% site capacity"
severity = "Major"
detect_label = "CDE Site Capacity @ 90%"
notifications = ["Slack,RedactedId,#channelname"]
}
}