Sonarr/Radarr/Prowlarr, Hetzner load balancers/floating IPs/certificates, traffic forecast

New integration kinds sonarr, radarr and prowlarr (shared adapter and sync, page under
Apps -> Media managers): own health findings, stuck downloads, nearly full disks.
Hetzner now reads load balancers (target health), floating IPs and certificates, includes
them in the cost estimate, and forecasts the month's traffic against the quota.
Migrations 0072 and 0073; docs, metrics 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 20:04:55 +01:00
1 parent 9a3d5c466a
commit d9083adb5b
38 files changed
+18374 -42

No files matched your search

+22 -3
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` … `0071`), applied automatically when the server starts. Which ones have run is recorded in the table `__drizzle_migrations`. |
| **Tables** | 83 application tables, plus drizzle's own `__drizzle_migrations`. |
| **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`. |
**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`.
@@ -76,6 +76,7 @@ erDiagram
integrations ||--o{ dockhand_vulnerabilities : "cascade"
integrations ||--o| hetzner_state : "cascade"
integrations ||--o| fragnet_state : "cascade"
integrations ||--o| arr_state : "cascade"
integrations ||--o{ speedtest_results : "cascade"
integrations ||--o| netbox_state : "cascade"
integrations ||--o| n8n_state : "cascade"
@@ -960,7 +961,8 @@ How a Hetzner Cloud project (an integration of type `hetzner`; a token belongs t
| `integration_id` | integer PK | |
| `servers` | text NOT NULL, default `[]` | JSON: each server as read (status, type, location, addresses, traffic this month and included, rescue mode, backup window, monthly price) plus what the app has seen of it between reads: `lastRunningAt`, `statusSince`, `rescueSince`. Hetzner does not say when a server went off; these are the times of the reads that showed it. |
| `volumes`, `images` | text | JSON; the volumes, and the snapshots and backups. **Null when they could not be asked** — which is not the same as none. |
| `cost` | text | JSON: the monthly estimate at list prices including VAT (currency, servers, backups, volumes, snapshots, IPs, total). Null when the price list could not be read. |
| `cost` | text | JSON: the monthly estimate at list prices including VAT (currency, servers, backups, volumes, snapshots, IPs, load balancers, floating IPs, total). Null when the price list could not be read. |
| `load_balancers`, `floating_ips`, `certificates` | text | JSON: each load balancer with the health of its targets, each floating IP and what it points at, each certificate with when it ends. **Null when they could not be asked.** (Migration `0072`.) |
| `updated_at` | text NOT NULL | ISO. |
How the last read went is kept in `settings`, key `_internal:hetznerSync`.
@@ -977,6 +979,23 @@ How a Fragnet game panel account (an integration of type `fragnet`; an API key b
How the last read went is kept in `settings`, key `_internal:fragnetSync`.
#### `arr_state`
How a Sonarr, Radarr or Prowlarr (an integration of type `sonarr`, `radarr` or `prowlarr`) is right now, one row each, replaced at every read (every five minutes). `integration_id` is the primary key and a foreign key with **cascade**. There is no history: what is stored is the last good read.
| Column | Type | Notes |
|---|---|---|
| `integration_id` | integer PK | |
| `version` | text | |
| `health` | text NOT NULL, default `[]` | JSON: what its own checks found (source, type, message). |
| `queue` | text | JSON `{ total, items }`: how many downloads there are and the first hundred (title, status, how it is judged, what it says is wrong, size, when it was added, client, indexer). **Null when it could not be read** — and always for Prowlarr, which has none. |
| `disks` | text | JSON: path, free and total bytes; null when it could not be read. |
| `missing` | integer | Wanted items with no file (Sonarr, Radarr); null when not read. |
| `indexers` | text | JSON, Prowlarr only: each indexer and, if Prowlarr has switched it off after failures, until when. |
| `updated_at` | text NOT NULL | ISO. |
How the last read went is kept in `settings`, key `_internal:arrSync`.
#### `n8n_state`
How an n8n (an integration of type `n8n`) is right now, one row each, replaced at every read (every five minutes). `integration_id` is the primary key and a foreign key with **cascade**.