This commit is contained in:
Alex Holliday committed 2026-01-18 23:54:42 +00:00
1 parent a86588f080
commit c2487f0134
2 files changed
+1 -4

No files matched your search

@@ -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() {
@@ -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<string, boolean> = {
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,