A UPS in the map: read over NUT or SNMP, alerts, shutdown order
New UPS integration (NUT or SNMP v2c, read only). Monitoring -> UPS shows charge, runtime, load and mains voltage with history and the times mains power was lost. Mains lost and a nearly empty battery are critical alerts; battery to be replaced and a heavy load are warnings. The UPS is a node in the dependency map and counts as down while on battery, so servers that go offline with it are folded under its alert; the page lists what is on it in the order to shut it down. /metrics series and docs added. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3cb3e4988f
commit
232a5661ab
38 files changed
+8049
-16
No files matched your search
@@ -0,0 +1,31 @@
|
||||
CREATE TABLE `ups_readings` (
|
||||
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
|
||||
`integration_id` integer NOT NULL,
|
||||
`at` text NOT NULL,
|
||||
`charge` real,
|
||||
`runtime_seconds` integer,
|
||||
`load_percent` real,
|
||||
`input_voltage` real,
|
||||
`on_battery` integer DEFAULT false NOT NULL,
|
||||
FOREIGN KEY (`integration_id`) REFERENCES `integrations`(`id`) ON UPDATE no action ON DELETE cascade
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE INDEX `ups_readings_lookup_idx` ON `ups_readings` (`integration_id`,`at`);--> statement-breakpoint
|
||||
CREATE TABLE `ups_state` (
|
||||
`integration_id` integer PRIMARY KEY NOT NULL,
|
||||
`model` text,
|
||||
`manufacturer` text,
|
||||
`status_text` text NOT NULL,
|
||||
`on_battery` integer DEFAULT false NOT NULL,
|
||||
`low_battery` integer DEFAULT false NOT NULL,
|
||||
`replace_battery` integer DEFAULT false NOT NULL,
|
||||
`overload` integer DEFAULT false NOT NULL,
|
||||
`charge` real,
|
||||
`runtime_seconds` integer,
|
||||
`load_percent` real,
|
||||
`input_voltage` real,
|
||||
`output_voltage` real,
|
||||
`on_battery_since` text,
|
||||
`updated_at` text NOT NULL,
|
||||
FOREIGN KEY (`integration_id`) REFERENCES `integrations`(`id`) ON UPDATE no action ON DELETE cascade
|
||||
);
|
||||
File diff suppressed because it is too large.
Load diff
@@ -379,6 +379,13 @@
|
||||
"when": 1792609540216,
|
||||
"tag": "0053_dashing_stark_industries",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 54,
|
||||
"version": "6",
|
||||
"when": 1792610229172,
|
||||
"tag": "0054_green_beast",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in new issue
Block a user