Skip to content

Commit 2cb4e5d

Browse files
committed
Don't duplicate checks, but send the existing check to pytorch slack instead.
Signed-off-by: Jordan Conway <[email protected]>
1 parent ca7e235 commit 2cb4e5d

File tree

1 file changed

+43
-73
lines changed

1 file changed

+43
-73
lines changed

datadog-synthetics_tests.tf

Lines changed: 43 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,13 @@ resource "datadog_synthetics_test" "pytorch-landscape" {
251251
resource "datadog_synthetics_test" "pytorch-discuss" {
252252
type = "api"
253253
name = "discuss.pytorch.org Check"
254-
message = "Notify @webhook-lf-incident-io. Follow https://linuxfoundation.atlassian.net/wiki/spaces/IT/pages/30416028/On-call+Common+Fixes how to fix the issue."
254+
message = <<EOT
255+
discuss.pytorch.org is down or returning non-200 status code.
256+
257+
{{{synthetics.attributes.result.failure.message}}}
258+
259+
@slack-pytorch-infra-alerts
260+
EOT
255261
status = "live"
256262
tags = ["env:project", "project:pytorch", "service:discuss"]
257263
locations = ["aws:us-west-2"]
@@ -278,6 +284,42 @@ resource "datadog_synthetics_test" "pytorch-discuss" {
278284
}
279285
}
280286

287+
resource "datadog_synthetics_test" "pytorch-discourse-certificate" {
288+
type = "api"
289+
subtype = "ssl"
290+
name = "SSL Certificate Validity - discuss.pytorch.org"
291+
message = <<EOT
292+
discuss.pytorch.org TLS certificate is close to expiring.
293+
294+
{{{synthetics.attributes.result.failure.message}}}
295+
296+
@slack-pytorch-infra-alerts
297+
EOT
298+
status = "live"
299+
tags = [
300+
"env:project",
301+
"project:pytorch",
302+
"service:discourse"
303+
]
304+
locations = ["aws:us-west-2"]
305+
options_list {
306+
tick_every = 3600
307+
retry {
308+
count = 2
309+
interval = 60000
310+
}
311+
}
312+
request_definition {
313+
host = "discuss.pytorch.org"
314+
port = 443
315+
}
316+
assertion {
317+
type = "certificate"
318+
operator = "isInMoreThan"
319+
target = 30
320+
}
321+
}
322+
281323
###############
282324
# Dev Discuss #
283325
###############
@@ -547,76 +589,4 @@ EOT
547589
}
548590
}
549591

550-
resource "datadog_synthetics_test" "pytorch-discourse-uptime" {
551-
type = "api"
552-
name = "Discourse Availability - discuss.pytorch.org"
553-
message = <<EOT
554-
discuss.pytorch.org looks down or is returning non-200 responses.
555-
556-
{{{synthetics.attributes.result.failure.message}}}
557-
558-
@slack-pytorch-infra-alerts
559-
EOT
560-
status = "live"
561-
tags = [
562-
"env:project",
563-
"project:pytorch",
564-
"service:discourse"
565-
]
566-
locations = ["aws:us-west-2"]
567-
options_list {
568-
tick_every = 300
569-
retry {
570-
count = 2
571-
interval = 60000
572-
}
573-
follow_redirects = true
574-
min_failure_duration = 120
575-
min_location_failed = 1
576-
}
577-
request_definition {
578-
method = "GET"
579-
url = "https://discuss.pytorch.org/"
580-
}
581-
assertion {
582-
type = "statusCode"
583-
operator = "is"
584-
target = 200
585-
}
586-
}
587-
588-
resource "datadog_synthetics_test" "pytorch-discourse-certificate" {
589-
type = "api"
590-
subtype = "ssl"
591-
name = "SSL Certificate Validity - discuss.pytorch.org"
592-
message = <<EOT
593-
discuss.pytorch.org TLS certificate is close to expiring.
594-
595-
{{{synthetics.attributes.result.failure.message}}}
596592

597-
@slack-pytorch-infra-alerts
598-
EOT
599-
status = "live"
600-
tags = [
601-
"env:project",
602-
"project:pytorch",
603-
"service:discourse"
604-
]
605-
locations = ["aws:us-west-2"]
606-
options_list {
607-
tick_every = 3600
608-
retry {
609-
count = 2
610-
interval = 60000
611-
}
612-
}
613-
request_definition {
614-
host = "discuss.pytorch.org"
615-
port = 443
616-
}
617-
assertion {
618-
type = "certificate"
619-
operator = "isInMoreThan"
620-
target = 30
621-
}
622-
}

0 commit comments

Comments
 (0)