add monitor thresholds
This commit is contained in:
1 parent
ba6c9a481d
commit
75ef6c934d
3 files changed
+28
No files matched your search
@@ -62,6 +62,14 @@ export const monitorSchema = z
|
||||
secret: z.string().optional(),
|
||||
interval: z.number({ message: "Interval required" }),
|
||||
rejectUnauthorized: z.boolean().default(true),
|
||||
thresholds: z
|
||||
.object({
|
||||
cpu: z.number().min(0).max(100).optional(),
|
||||
memory: z.number().min(0).max(100).optional(),
|
||||
disk: z.number().min(0).max(100).optional(),
|
||||
temperature: z.number().min(0).max(150).optional(),
|
||||
})
|
||||
.optional(),
|
||||
})
|
||||
.superRefine((data, ctx) => {
|
||||
const minIntervals: Record<string, number> = {
|
||||
|
||||
Reference in new issue
Block a user