Compare commits

...
Author SHA1 Message Date
ajnart f677e23d09 fix(unraid): use byte-based memory metrics 2026-09-06 10:51:42 +02:00
2 changed files with 2 additions and 15 deletions

No files matched your search

@@ -39,9 +39,8 @@ export class UnraidIntegration extends Integration implements ISystemHealthMonit
const cpuUtilization = systemInfo.metrics.cpu.cpus.reduce((acc, val) => acc + val.percentTotal, 0);
const cpuCount = systemInfo.info.cpu.cores;
// We use "info" object instead of the stats since this is the exact amount the kernel sees, which is what Unraid displays.
const totalMemory = systemInfo.info.memory.layout.reduce((acc, layout) => layout.size + acc, 0);
const usedMemory = totalMemory * (systemInfo.metrics.memory.percentTotal / 100);
const totalMemory = systemInfo.metrics.memory.total;
const usedMemory = Math.max(totalMemory - systemInfo.metrics.memory.available, 0);
const uptime = dayjs(systemInfo.info.os.uptime);
return {
@@ -136,11 +135,6 @@ export class UnraidIntegration extends Integration implements ISystemHealthMonit
brand,
cores,
threads
},
memory {
layout {
size
}
}
}
}
@@ -60,13 +60,6 @@ export const unraidSystemInfoSchema = z.object({
cores: z.number(),
threads: z.number(),
}),
memory: z.object({
layout: z.array(
z.object({
size: z.number(),
}),
),
}),
}),
});