Open-source status page, incident response and uptime monitoring
TypeScript alertingincident-managementmcpmcp-servermonitoringmonitoring-as-codeobservabilityon-callopen-sourcesrestatus-pagestatuspagesynthetic-monitoringterraformtinybirdtursouptimeuptime-checkeruptime-monitor
π alerting (#1022)
Thibault Le Ouaye715415b8089
diff --git a/apps/server/src/checker/alerting.test.ts b/apps/server/src/checker/alerting.test.tsindex 3b186b4eb..c03f0fe48 100644--- a/apps/server/src/checker/alerting.test.ts+++ b/apps/server/src/checker/alerting.test.ts@@ -15,6 +15,8 @@ test.todo("should send email notification", async () => {monitorId: "1",statusCode: 400,notifType: "alert",+ cronTimestamp: 123456,+ incidentId: "1",});expect(fn).toHaveBeenCalled();});diff --git a/apps/server/src/checker/alerting.ts b/apps/server/src/checker/alerting.tsindex 16cafd13f..0eb724a96 100644--- a/apps/server/src/checker/alerting.ts+++ b/apps/server/src/checker/alerting.ts@@ -25,7 +25,7 @@ export const triggerNotifications = async ({message?: string;notifType: "alert" | "recovery" | "degraded";cronTimestamp: number;- incidentId?: string;+ incidentId: string;}) => {console.log(`π triggerAlerting for ${monitorId}`);const notifications = await dbdiff --git a/apps/server/src/checker/index.ts b/apps/server/src/checker/index.tsindex d183b1fd9..de13d2f79 100644--- a/apps/server/src/checker/index.ts+++ b/apps/server/src/checker/index.ts@@ -102,6 +102,7 @@ checkerRoute.post("/updateStatus", async (c) => {message,notifType: "degraded",cronTimestamp,+ incidentId: `${cronTimestamp}`,});}}@@ -178,6 +179,7 @@ checkerRoute.post("/updateStatus", async (c) => {message,notifType: "alert",cronTimestamp,+ incidentId: String(newIncident[0].id),});if (newIncident.length > 0) {@@ -268,6 +270,7 @@ checkerRoute.post("/updateStatus", async (c) => {message,notifType: "recovery",cronTimestamp,+ incidentId: String(incident.id),});const monitor = await db