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
@@ -1,4 +1,5 @@
|
||||
import { evaluateHealth, type Thresholds } from "./healthMonitor.js";
|
||||
import { parseThresholds } from "./serverThresholds.js";
|
||||
|
||||
/** The columns of a server row the summary reads. */
|
||||
export interface SummaryRow {
|
||||
@@ -7,6 +8,8 @@ export interface SummaryRow {
|
||||
osType: string;
|
||||
lastSeenAt: string | null;
|
||||
disks: string | null; // JSON, as the agent's report is stored
|
||||
/** This server's own thresholds, as stored. */
|
||||
thresholds?: string | null;
|
||||
}
|
||||
|
||||
export interface ServerSummary {
|
||||
@@ -40,7 +43,7 @@ function parseDisks(text: string | null): { mount: string; sizeBytes: number; us
|
||||
*/
|
||||
export function buildServerSummary(rows: SummaryRow[], thresholds: Thresholds, now: number, silencedSubjects: Set<string> = new Set()): ServerSummary {
|
||||
const snapshot = {
|
||||
servers: rows.map((r) => ({ id: r.id, name: r.name, lastSeenAt: r.lastSeenAt, disks: parseDisks(r.disks) })),
|
||||
servers: rows.map((r) => ({ id: r.id, name: r.name, lastSeenAt: r.lastSeenAt, disks: parseDisks(r.disks), thresholds: parseThresholds(r.thresholds) })),
|
||||
proxmox: [],
|
||||
synology: [],
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user