Fragnet game servers: games, addresses, backups, power actions
New integration kind "fragnet" reading Fragnet's Pterodactyl-based panel through the client API (account key). Game servers page under Infrastructure with game, IP:port, state, memory/disk, backups, schedules and databases; alerts for late backups and nearly full disk/memory; operators can start/stop/restart/kill (audited). Metrics, docs and tests included; migration 0071 adds fragnet_state. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
f86661f6c9
commit
9a3d5c466a
29 files changed
+9836
-8
No files matched your search
+15
-2
@@ -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` … `0070`), applied automatically when the server starts. Which ones have run is recorded in the table `__drizzle_migrations`. |
|
||||
| **Tables** | 82 application tables, plus drizzle's own `__drizzle_migrations`. |
|
||||
| **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`. |
|
||||
|
||||
**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`.
|
||||
|
||||
@@ -75,6 +75,7 @@ erDiagram
|
||||
integrations ||--o| nextcloud_state : "cascade"
|
||||
integrations ||--o{ dockhand_vulnerabilities : "cascade"
|
||||
integrations ||--o| hetzner_state : "cascade"
|
||||
integrations ||--o| fragnet_state : "cascade"
|
||||
integrations ||--o{ speedtest_results : "cascade"
|
||||
integrations ||--o| netbox_state : "cascade"
|
||||
integrations ||--o| n8n_state : "cascade"
|
||||
@@ -964,6 +965,18 @@ How a Hetzner Cloud project (an integration of type `hetzner`; a token belongs t
|
||||
|
||||
How the last read went is kept in `settings`, key `_internal:hetznerSync`.
|
||||
|
||||
#### `fragnet_state`
|
||||
|
||||
How a Fragnet game panel account (an integration of type `fragnet`; an API key belongs to one account) 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 | |
|
||||
| `servers` | text NOT NULL, default `[]` | JSON: each game server as read (the panel's short id, name, game, addresses, SFTP, limits, running state, what it uses, backups, schedules, database count) plus what the app has seen of it between reads: `stateSince` and `firstSeenAt`. A part that could not be read (backups, schedules, databases, usage) is **null** — which is not the same as none. |
|
||||
| `updated_at` | text NOT NULL | ISO. |
|
||||
|
||||
How the last read went is kept in `settings`, key `_internal:fragnetSync`.
|
||||
|
||||
#### `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**.
|
||||
|
||||
Reference in new issue
Block a user