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

+17 -4
View File
@@ -23,8 +23,8 @@ what the app actually creates.
|---|---|
| **File** | `DATABASE_PATH`, default `../data/homelab-manager.sqlite` (relative to `server/`; `/app/data/...` in Docker). The folder is created if missing. |
| **Foreign keys** | Switched on for every connection (`PRAGMA foreign_keys = ON`), so the `ON DELETE` rules below are enforced. |
| **Migrations** | SQL files in [`server/drizzle/`](server/drizzle) (`0000` … `0073`), applied automatically when the server starts. Which ones have run is recorded in the table `__drizzle_migrations`. |
| **Tables** | 84 application tables, plus drizzle's own `__drizzle_migrations`. |
| **Migrations** | SQL files in [`server/drizzle/`](server/drizzle) (`0000` … `0074`), applied automatically when the server starts. Which ones have run is recorded in the table `__drizzle_migrations`. |
| **Tables** | 85 application tables, plus drizzle's own `__drizzle_migrations`. |
**Not in the database, but beside it in the data folder:** the backups of the database itself (`backups/homelab-manager-….sqlite`, taken daily and on request; see [BACKUP.md](BACKUP.md)), and, only while a restore is waiting or has just happened, `restore-pending.sqlite` / `restore-pending.json` and `restore-result.json`.
@@ -105,10 +105,10 @@ erDiagram
event_webhooks ||--o{ webhook_deliveries : "cascade"
```
These 21 tables are without a foreign key to another table, and — but for `integration_credentials`, which `integrations` and `dns_providers` point at — with none from another table to them; where they refer to something else it is by id or name, see
These 22 tables are without a foreign key to another table, and — but for `integration_credentials`, which `integrations` and `dns_providers` point at — with none from another table to them; where they refer to something else it is by id or name, see
[soft references](#soft-references-not-foreign-keys): `settings`, `secrets`, `ipam_entries`, `domains`, `diag_log`, `notification_queue`, `consistency_ignores`, `tag_definitions`,
`maintenance_windows`, `maintenance_aliases`, `maintenance_schedules`, `metrics_tokens`, `restore_tests`, `dependencies`, `runbooks`, `renewals`, `assets`, `notes`,
`alert_rules`, `alert_snoozes` and `integration_credentials`.
`alert_rules`, `alert_snoozes`, `alert_kind_runbooks` and `integration_credentials`.
## Tables
@@ -684,6 +684,19 @@ Notes about what to do when something is wrong, attached to a server, integratio
| `updated_by` | text | The person's name at the time. |
| `created_at`, `updated_at` | text NOT NULL | ISO. |
#### `alert_kind_runbooks`
What to do first about a **kind** of alert, whichever server or integration it is about — shown beside every alert of that kind on the Alerts page (*What to do*). The kind is the first part of an alert's key (`disk`, `hetzner-cert`, `sonarr-queue`). One row for each kind; no foreign keys.
| Column | Type | Notes |
|---|---|---|
| `kind` | text PK | |
| `title` | text NOT NULL | |
| `body` | text NOT NULL, default empty | Plain text with the little formatting runbooks use; never rendered as HTML. May be empty when there is a `url`. |
| `url` | text | A page to open (`http` or `https` only); null when there is none. |
| `updated_by` | text | The person's name at the time. |
| `updated_at` | text NOT NULL | ISO. |
#### `assets`
The hardware inventory.