Skip to content

Commit ca7e235

Browse files
committed
Add check for https://discuss.pytorch.org/ along with ssl certificate valididty check.
Signed-off-by: Jordan Conway <[email protected]>
1 parent 882f6ab commit ca7e235

File tree

1 file changed

+74
-0
lines changed

1 file changed

+74
-0
lines changed

datadog-synthetics_tests.tf

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -546,3 +546,77 @@ EOT
546546
code = file("scripts/check-long-queue-nvidia.js")
547547
}
548548
}
549+
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}}}
596+
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)