Skip to content

Commit 18af16d

Browse files
authored
Add check for https://discuss.pytorch.org/ along with ssl certificate… (#43)
* Add check for https://discuss.pytorch.org/ along with ssl certificate valididty check. Signed-off-by: Jordan Conway <[email protected]> * Don't duplicate checks, but send the existing check to pytorch slack instead. Signed-off-by: Jordan Conway <[email protected]> --------- Signed-off-by: Jordan Conway <[email protected]>
1 parent 882f6ab commit 18af16d

File tree

1 file changed

+45
-1
lines changed

1 file changed

+45
-1
lines changed

datadog-synthetics_tests.tf

Lines changed: 45 additions & 1 deletion
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
###############
@@ -546,3 +588,5 @@ EOT
546588
code = file("scripts/check-long-queue-nvidia.js")
547589
}
548590
}
591+
592+

0 commit comments

Comments
 (0)