add hardware metric key types

This commit is contained in:
Alex Holliday committed 2026-09-24 11:46:04 -07:00
1 parent 3586ac9437
commit 21fb320f3a
4 files changed
+21 -16

No files matched your search

@@ -240,3 +240,8 @@ export type GamesMap = Record<string, Game>;
export type MonitorScheduleFields = Pick<Monitor, "id" | "type" | "isActive" | "interval" | "geoCheckEnabled" | "geoCheckInterval">;
export type DockerContainerLogsResult = DockerLogPage;
export const HardwareMetricKeys = ["cpu", "memory", "disk", "temp"] as const;
export type HardwareMetricKey = (typeof HardwareMetricKeys)[number];
export type HardwareBreaches = Record<HardwareMetricKey, boolean>;
export type HardwareCounters = Record<HardwareMetricKey, number>;
@@ -1,3 +1,5 @@
import { HardwareMetricKey } from "@/domain/monitors/monitor.type.js";
export const NotificationChannels = [
"email",
"slack",
@@ -85,7 +87,7 @@ export interface MonitorInfo {
}
export interface ThresholdBreach {
metric: "cpu" | "memory" | "disk" | "temp";
metric: HardwareMetricKey;
currentValue: number;
threshold: number;
unit: string;