Open-source status page, incident response and uptime monitoring
TypeScript alertingincident-managementmcpmcp-servermonitoringmonitoring-as-codeobservabilityon-callopen-sourcesrestatus-pagestatuspagesynthetic-monitoringterraformtinybirdtursouptimeuptime-checkeruptime-monitor
π§ββοΈ doing π§ββοΈ things (#454)
Thibault Le Ouay51ef5cd184c4
diff --git a/apps/server/fly.sh b/apps/server/fly.shnew file mode 100755index 000000000..b5c8dafdf--- /dev/null+++ b/apps/server/fly.sh@@ -0,0 +1,6 @@+#!/bin/bash+++fly machines list --json | jq .[].id | sed 's/"//g' | while read machine; do+ fly machines update $machine --restart always --yes+done\ No newline at end of filediff --git a/apps/server/fly.toml b/apps/server/fly.tomlindex 448b98500..3e54ecda6 100644--- a/apps/server/fly.toml+++ b/apps/server/fly.toml@@ -13,9 +13,9 @@ primary_region = "ams"[http_service]internal_port = 3000force_https = true- auto_stop_machines = true+ auto_stop_machines = falseauto_start_machines = true- min_machines_running = 12+ min_machines_running = 2processes = ["app"][http_service.concurrency]type = "requests"diff --git a/apps/server/src/checker/alerting.ts b/apps/server/src/checker/alerting.tsindex 87a47d42a..bab1058db 100644--- a/apps/server/src/checker/alerting.ts+++ b/apps/server/src/checker/alerting.ts@@ -4,7 +4,6 @@ import {selectMonitorSchema,selectNotificationSchema,} from "@openstatus/db/src/schema";-import type { flyRegions } from "@openstatus/utils";import { flyRegionsDict } from "@openstatus/utils";import { providerToFunction } from "./utils";diff --git a/apps/server/src/checker/index.ts b/apps/server/src/checker/index.tsindex 96c1ee405..fdb233e66 100644--- a/apps/server/src/checker/index.ts+++ b/apps/server/src/checker/index.ts@@ -54,6 +54,12 @@ checkerRoute.post("/checker", async (c) => {JSON.stringify(result.data),e,);+ if (result.data.status === "error") {+ console.log(+ `The monitor was already in error we should not retry checker URL: ${result.data}`,+ );+ return c.text("Ok", 200);+ }return c.text("Internal Server Error", 500);}});@@ -96,6 +102,12 @@ checkerRoute.post("/checkerV2", async (c) => {);return c.text("Ok", 200);} catch (e) {+ if (result.data.status === "error") {+ console.log(+ `The monitor was already in error we should not retry checker URL: ${result.data}`,+ );+ return c.text("Ok", 200);+ }console.error(`fail checker URL: ${result.data.url} monitorId ${result.data.monitorId}`,JSON.stringify(result.data),