From c2487f013437b1c6e85adedf2d029c40eb3fb78f Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Sun, 18 Jan 2026 23:54:42 +0000 Subject: [PATCH] alerts --- .../infrastructure/SuperSimpleQueue/SuperSimpleQueueHelper.ts | 3 --- .../src/service/infrastructure/notificationProviders/utils.ts | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/server/src/service/infrastructure/SuperSimpleQueue/SuperSimpleQueueHelper.ts b/server/src/service/infrastructure/SuperSimpleQueue/SuperSimpleQueueHelper.ts index 21ee6e388..d1315e151 100644 --- a/server/src/service/infrastructure/SuperSimpleQueue/SuperSimpleQueueHelper.ts +++ b/server/src/service/infrastructure/SuperSimpleQueue/SuperSimpleQueueHelper.ts @@ -24,7 +24,6 @@ class SuperSimpleQueueHelper { notificationsService, checkService, buffer, - incidentService, }: { db: any; logger: any; @@ -34,7 +33,6 @@ class SuperSimpleQueueHelper { notificationsService: INotificationsService; checkService: any; buffer: any; - incidentService: any; }) { this.db = db; this.logger = logger; @@ -44,7 +42,6 @@ class SuperSimpleQueueHelper { this.checkService = checkService; this.buffer = buffer; this.notificationsService = notificationsService; - this.incidentService = incidentService; } get serviceName() { diff --git a/server/src/service/infrastructure/notificationProviders/utils.ts b/server/src/service/infrastructure/notificationProviders/utils.ts index 9a1b2e7f8..ad8dc14ae 100644 --- a/server/src/service/infrastructure/notificationProviders/utils.ts +++ b/server/src/service/infrastructure/notificationProviders/utils.ts @@ -8,7 +8,7 @@ const buildHardwareAlerts = async (clientHost: string, monitor: Monitor, network const metrics = payload.data || {}; const { cpu: { usage_percent: cpuUsage = -1 } = {}, memory: { usage_percent: memoryUsage = -1 } = {}, disk = [] } = metrics; - const alerts = { + const alerts: Record = { cpu: cpuThreshold !== -1 && cpuUsage > cpuThreshold ? true : false, memory: memoryThreshold !== -1 && memoryUsage > memoryThreshold ? true : false, disk: disk?.some((d) => diskThreshold !== -1 && typeof d?.usage_percent === "number" && d?.usage_percent > diskThreshold) ?? false,