diff --git a/server/lib/alerts/events/healthCheckEvents.ts b/server/lib/alerts/events/healthCheckEvents.ts index 0a6d40f16..00afa22f0 100644 --- a/server/lib/alerts/events/healthCheckEvents.ts +++ b/server/lib/alerts/events/healthCheckEvents.ts @@ -6,6 +6,7 @@ export async function fireHealthCheckHealthyAlert( healthCheckName?: string, healthCheckTargetId?: number | null, extra?: Record, + send: boolean = true, trx?: unknown ): Promise { return; @@ -17,6 +18,7 @@ export async function fireHealthCheckUnhealthyAlert( healthCheckName?: string, healthCheckTargetId?: number | null, extra?: Record, + send: boolean = true, trx?: unknown ): Promise { return; @@ -28,7 +30,8 @@ export async function fireHealthCheckUnknownAlert( healthCheckName?: string | null, healthCheckTargetId?: number | null, extra?: Record, + send: boolean = true, trx?: unknown ): Promise { return; -} \ No newline at end of file +} diff --git a/server/lib/alerts/events/resourceEvents.ts b/server/lib/alerts/events/resourceEvents.ts index 09dd7d8cf..e7a374b44 100644 --- a/server/lib/alerts/events/resourceEvents.ts +++ b/server/lib/alerts/events/resourceEvents.ts @@ -3,6 +3,7 @@ export async function fireResourceHealthyAlert( resourceId: number, resourceName?: string | null, extra?: Record, + send: boolean = true, trx?: unknown ): Promise {} @@ -11,6 +12,7 @@ export async function fireResourceUnhealthyAlert( resourceId: number, resourceName?: string | null, extra?: Record, + send: boolean = true, trx?: unknown ): Promise {} @@ -19,5 +21,6 @@ export async function fireResourceToggleAlert( resourceId: number, resourceName?: string | null, extra?: Record, + send: boolean = true, trx?: unknown -): Promise {} \ No newline at end of file +): Promise {} diff --git a/server/routers/target/createTarget.ts b/server/routers/target/createTarget.ts index 96df0260d..d582d06da 100644 --- a/server/routers/target/createTarget.ts +++ b/server/routers/target/createTarget.ts @@ -266,7 +266,7 @@ export async function createTarget( await fireHealthCheckUnhealthyAlert( healthCheck[0].orgId, healthCheck[0].targetHealthCheckId, - healthCheck[0].name, + healthCheck[0].name || "", healthCheck[0].targetId, undefined, false, // dont send the alert because we just want to create the alert, not notify users yet @@ -287,7 +287,7 @@ export async function createTarget( await fireHealthCheckHealthyAlert( healthCheck[0].orgId, healthCheck[0].targetHealthCheckId, - healthCheck[0].name, + healthCheck[0].name || "", healthCheck[0].targetId, undefined, false, // dont send the alert because we just want to create the alert, not notify users yet