Stale-backup alerts, per-server alert limits, and update runs from the Updates page
- Backups: a guest whose newest backup is older than its limit is an alert (backup kind), in the daily backup message, the digest and /metrics (homelab_backup_guests, ..._last_age_seconds) - Per-server thresholds (servers.thresholds, migration 0030): offline minutes, disk percent, forecast window, backup age, and per-disk limits or "leave alone"; applied everywhere the global ones were; saving clears the alerts cache - Update runs (update_runs, migration 0031): Update... on the Updates page puts the server under maintenance, runs a Semaphore playbook limited to it, waits for the host to report, and reports what is left and whether a restart is due; poller survives restarts - Notification toggle for update-run results; tests and docs Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
5dc6cea69c
commit
7a5b623444
42 files changed
+7561
-57
No files matched your search
@@ -0,0 +1 @@
|
||||
ALTER TABLE `servers` ADD `thresholds` text;
|
||||
@@ -0,0 +1,28 @@
|
||||
CREATE TABLE `update_runs` (
|
||||
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
|
||||
`server_id` integer NOT NULL,
|
||||
`integration_id` integer NOT NULL,
|
||||
`project_id` integer NOT NULL,
|
||||
`template_id` integer NOT NULL,
|
||||
`template_name` text NOT NULL,
|
||||
`host_limit` text NOT NULL,
|
||||
`task_id` integer,
|
||||
`task_status` text,
|
||||
`window_id` integer,
|
||||
`window_created` integer DEFAULT false NOT NULL,
|
||||
`status` text NOT NULL,
|
||||
`message` text,
|
||||
`started_by` text,
|
||||
`started_at` text NOT NULL,
|
||||
`task_ended_at` text,
|
||||
`host_reported_at` text,
|
||||
`finished_at` text,
|
||||
`updates_before` integer,
|
||||
`updates_after` integer,
|
||||
`reboot_required` integer DEFAULT false NOT NULL,
|
||||
`poll_errors` integer DEFAULT 0 NOT NULL,
|
||||
FOREIGN KEY (`server_id`) REFERENCES `servers`(`id`) ON UPDATE no action ON DELETE cascade
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE INDEX `update_runs_server_idx` ON `update_runs` (`server_id`,`started_at`);--> statement-breakpoint
|
||||
CREATE INDEX `update_runs_status_idx` ON `update_runs` (`status`);
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -211,6 +211,20 @@
|
||||
"when": 1792273577264,
|
||||
"tag": "0029_past_monster_badoon",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 30,
|
||||
"version": "6",
|
||||
"when": 1792278520773,
|
||||
"tag": "0030_icy_snowbird",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 31,
|
||||
"version": "6",
|
||||
"when": 1792278718505,
|
||||
"tag": "0031_sad_lizard",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in new issue
Block a user