Fold alerts under their host, recurring maintenance, run playbooks from alerts, and an Updates page
- Servers can say what they run on (or it is worked out from the Proxmox node); when the host is down the guests' offline alerts fold under it: held back, not counted, not notified, still recorded. - Recurring maintenance schedules made into ordinary windows a week ahead (maintenance_schedules). - Run a Semaphore template limited to a server from its page or an alert, and watch the run. - Agents report pending updates (apt, dnf, zypper, Windows Update); an Updates page lists them. - Migrations 0024 and 0025. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
44e393f172
commit
171511c6db
45 files changed
+6772
-44
No files matched your search
+28
-5
@@ -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` … `0023`), applied automatically when the server starts. Which ones have run is recorded in the table `__drizzle_migrations`. |
|
||||
| **Tables** | 25 application tables, plus drizzle's own `__drizzle_migrations`. |
|
||||
| **Migrations** | SQL files in [`server/drizzle/`](server/drizzle) (`0000` … `0025`), applied automatically when the server starts. Which ones have run is recorded in the table `__drizzle_migrations`. |
|
||||
| **Tables** | 26 application tables, plus drizzle's own `__drizzle_migrations`. |
|
||||
|
||||
**Not in the database:**
|
||||
|
||||
@@ -62,9 +62,9 @@ erDiagram
|
||||
integrations ||--o{ alert_tickets : "osTicket used (set null)"
|
||||
```
|
||||
|
||||
Nine tables stand alone, with no foreign keys: `settings`, `secrets`,
|
||||
Ten tables stand alone, with no foreign keys: `settings`, `secrets`,
|
||||
`ipam_entries`, `domains`, `diag_log`, `notification_queue`,
|
||||
`consistency_ignores`, `tag_definitions`, `share_links`. `maintenance_windows` and `maintenance_aliases` also have no
|
||||
`consistency_ignores`, `tag_definitions`, `share_links`, `maintenance_schedules`. `maintenance_windows` and `maintenance_aliases` also have no
|
||||
foreign key — see [soft references](#soft-references-not-foreign-keys).
|
||||
|
||||
## Tables
|
||||
@@ -145,7 +145,27 @@ required, so a forgotten window can't silence real problems forever.
|
||||
| `reason` | text | |
|
||||
| `started_at`, `ends_at` | text NOT NULL | ISO. |
|
||||
| `created_by` | text | Name of the person who opened it. `Uptime Kuma sync` for mirrored ones. |
|
||||
| `source` | text | `kuma:<integration id>:<maintenance id>` on windows mirrored from Uptime Kuma's schedule, so a later sync can find them again; NULL for ones started by hand. A window whose `started_at` is still in the future is *scheduled*: it silences nothing until it begins. A scheduled one that is cancelled has `ends_at` set equal to `started_at`. |
|
||||
| `source` | text | `kuma:<integration id>:<maintenance id>` on windows mirrored from Uptime Kuma's schedule, so a later sync can find them again; `schedule:<schedule id>:<date>` on windows made from a recurring schedule (so one is made once, even if it was cancelled); NULL for ones started by hand. A window whose `started_at` is still in the future is *scheduled*: it silences nothing until it begins. A scheduled one that is cancelled has `ends_at` set equal to `started_at`. |
|
||||
|
||||
#### `maintenance_schedules`
|
||||
|
||||
A maintenance that repeats ("Sundays 02:00–04:00 on these servers"). It only says when:
|
||||
the windows that silence alerts are ordinary `maintenance_windows` rows made a week
|
||||
ahead and marked `schedule:<id>:<date>`.
|
||||
|
||||
| Column | Type | Notes |
|
||||
|---|---|---|
|
||||
| `id` | integer PK | |
|
||||
| `name` | text NOT NULL | e.g. "Patch night". |
|
||||
| `reason` | text | |
|
||||
| `targets` | text NOT NULL | JSON `[{"type":"server","id":3}, …]`. Polymorphic like `maintenance_windows`, so no foreign key; a deleted target is skipped. |
|
||||
| `days` | text NOT NULL | JSON array of weekdays, 0 = Sunday … 6 = Saturday. |
|
||||
| `start_time` | text NOT NULL | `HH:MM` on the clock of `timezone`. |
|
||||
| `duration_minutes` | integer NOT NULL | |
|
||||
| `timezone` | text NOT NULL | IANA name, so 02:00 stays 02:00 across summer and winter time. |
|
||||
| `enabled` | bool NOT NULL, default 1 | Off makes no windows and takes back those that haven't begun. |
|
||||
| `created_by` | text | |
|
||||
| `created_at` | text NOT NULL | |
|
||||
|
||||
#### `maintenance_aliases`
|
||||
|
||||
@@ -194,6 +214,9 @@ what it last reported.
|
||||
| `proxmox_guest_type` | text | `qemu` \| `lxc`. |
|
||||
| `proxmox_vmid` | integer | The four `proxmox_*` columns are set together or cleared together (enforced by the API), by an admin — never by the agent. |
|
||||
| `hide_proxmox_link` | bool NOT NULL, default 0 | Hides the "Proxmox link" card for servers that aren't Proxmox guests. Ignored while the server is actually linked. |
|
||||
| `parent_server_id` | integer | The server this one runs on, set by an admin. **Not a foreign key** (a removed host's servers are cleared by the app). Null = work it out: a server linked to a Proxmox guest runs on the one server named after that guest's node. When the parent is down, this server's offline alert is folded under it. |
|
||||
| `pending_updates` | text | JSON `{"manager":"apt","count":5,"security":2,"rebootRequired":false,"reportedAt":"…"}` from the agent; null until it has said. `security` is null when the package manager can't tell. |
|
||||
| `updates_pending_since` | text | ISO; when updates were first seen waiting (and none were before). Null when none are waiting. |
|
||||
|
||||
#### `scheduled_tasks`
|
||||
|
||||
|
||||
Reference in new issue
Block a user