From d88d2e5d121d03ebfaf824fe67bc1767fd73305e Mon Sep 17 00:00:00 2001 From: "Rasmus \"Pez\" Wejlgaard" Date: Wed, 6 May 2026 06:01:59 +0100 Subject: [PATCH] Add git synthetic check (#99) --- terraform/grafana/synthetic_check_alerts.tf | 11 +++++++++++ terraform/grafana/synthetic_checks.tf | 22 +++++++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/terraform/grafana/synthetic_check_alerts.tf b/terraform/grafana/synthetic_check_alerts.tf index cbd7ffa..466549e 100644 --- a/terraform/grafana/synthetic_check_alerts.tf +++ b/terraform/grafana/synthetic_check_alerts.tf @@ -70,3 +70,14 @@ resource "grafana_synthetic_monitoring_check_alerts" "jellyfin-requests" { ] } +resource "grafana_synthetic_monitoring_check_alerts" "git" { + check_id = grafana_synthetic_monitoring_check.git.id + alerts = [ + { + name = "ProbeFailedExecutionsTooHigh" + threshold = 3 + period = "30m" + runbook_url = "" + } + ] +} \ No newline at end of file diff --git a/terraform/grafana/synthetic_checks.tf b/terraform/grafana/synthetic_checks.tf index d46e224..0c3ec46 100644 --- a/terraform/grafana/synthetic_checks.tf +++ b/terraform/grafana/synthetic_checks.tf @@ -130,3 +130,25 @@ resource "grafana_synthetic_monitoring_check" "jellyfin-requests" { ignore_changes = [settings] } } + +resource "grafana_synthetic_monitoring_check" "git" { + job = "git.pez.sh" + target = "https://git.pez.sh" + enabled = true + probes = [14] # 14 = London, UK + settings { + http { + method = "GET" + compression = "none" + fail_if_not_ssl = true + ip_version = "V4" + valid_http_versions = ["HTTP/2.0", "HTTP/1.1", "HTTP/1.0"] + valid_status_codes = ["200"] + } + } + frequency = 600000 + timeout = 3000 + lifecycle { + ignore_changes = [settings] + } +}