Runbooks per alert kind, high-vulnerability threshold, wall display extras

A "What to do" note (text and/or link) can be written once for a whole kind of alert and
shows beside every alert of that kind; alerts now carry their kind and source type.
New optional setting: warn when a Docker host has N or more high vulnerabilities (off by
default). The wall display gains tiles (Hetzner and game servers running, critical
vulnerabilities, stuck downloads) and a summary line for each group of integrations,
also in share links. Migration 0074; docs and tests included.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
bobbanandClaude Sonnet 5.5 committed 2026-10-27 21:15:45 +01:00
1 parent d9083adb5b
commit 3d9a2310bb
35 files changed
+9129 -30

No files matched your search

+12
View File
@@ -884,6 +884,18 @@ export const runbooks = sqliteTable(
(t) => [index("runbooks_target_idx").on(t.targetType, t.targetId)],
);
// What to do first about a KIND of alert, whichever server or integration it is about — "when a Hetzner certificate is about to end: renew it in the console, then check the
// load balancer". The kind is the first part of an alert's key ("disk", "hetzner-cert", "sonarr-queue"). Shown beside every alert of that kind on the Alerts page, as a note and/or a
// link. Read by routes/runbooks.ts.
export const alertKindRunbooks = sqliteTable("alert_kind_runbooks", {
kind: text("kind").primaryKey(),
title: text("title").notNull(),
body: text("body").notNull().default(""),
url: text("url"), // a page to open (the host's documentation, a wiki page); null when there is none
updatedBy: text("updated_by"),
updatedAt: text("updated_at").notNull(), // ISO
});
// ─── Acknowledgements and incidents ─────────────────────────────────────────
// "I'm on it" for one alert — see services/alertAcks.ts. Keyed by the alert's stable id (not a foreign key to anything); gone once the alert has been.