Authentik: know when the front door is about to shut
New Authentik integration (read-only, every 5 minutes): version, workers, outposts and their health, certificates and API tokens that expire, failed sign-ins and configuration errors. Monitoring -> Authentik page. Alerts: an outpost that serves apps has gone quiet (critical), certificate or token about to run out (critical close to it), no worker, failed sign-ins, configuration errors. Held by maintenance, held when unreadable, in /metrics. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
0146eb8bca
commit
aebe98bf15
33 files changed
+8050
-7
No files matched your search
+20
-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` … `0057`), applied automatically when the server starts. Which ones have run is recorded in the table `__drizzle_migrations`. |
|
||||
| **Tables** | 70 application tables, plus drizzle's own `__drizzle_migrations`. |
|
||||
| **Migrations** | SQL files in [`server/drizzle/`](server/drizzle) (`0000` … `0058`), applied automatically when the server starts. Which ones have run is recorded in the table `__drizzle_migrations`. |
|
||||
| **Tables** | 71 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`.
|
||||
|
||||
@@ -69,6 +69,7 @@ erDiagram
|
||||
integrations ||--o| ups_state : "cascade"
|
||||
integrations ||--o{ ups_readings : "cascade"
|
||||
integrations ||--o| jellyfin_state : "cascade"
|
||||
integrations ||--o| authentik_state : "cascade"
|
||||
integrations ||--o{ jellyfin_readings : "cascade"
|
||||
users ||--o{ todos : "assignee (set null)"
|
||||
servers ||--o{ network_server_links : "cascade"
|
||||
@@ -847,6 +848,23 @@ A UPS at a moment, for the charts: one every five minutes, and every minute whil
|
||||
| `runtime_seconds` | integer | |
|
||||
| `on_battery` | bool NOT NULL, default 0 | |
|
||||
|
||||
#### `authentik_state`
|
||||
|
||||
How an Authentik (an integration of type `authentik`) 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 table.
|
||||
|
||||
| Column | Type | Notes |
|
||||
|---|---|---|
|
||||
| `integration_id` | integer PK | |
|
||||
| `version`, `latest_version` | text | As Authentik says. |
|
||||
| `outdated` | bool NOT NULL, default 0 | A newer version is out. |
|
||||
| `workers` | integer | How many are connected; null when they could not be asked (which is not the same as none). |
|
||||
| `outposts` | text NOT NULL, default `[]` | JSON: name, type, providers, healthy, instances, outdated, lastSeen. |
|
||||
| `certificates` | text NOT NULL, default `[]` | JSON: name, expires (those Authentik does not renew itself). |
|
||||
| `tokens` | text NOT NULL, default `[]` | JSON: identifier, intent, user, expires (API tokens and app passwords that expire). |
|
||||
| `failed_logins_24h`, `config_errors_24h` | integer | In the last day (a page of 100 means "at least"); null when the events could not be read. |
|
||||
| `last_config_error` | text | The newest configuration error's message. |
|
||||
| `updated_at` | text NOT NULL | ISO. |
|
||||
|
||||
#### `jellyfin_state`
|
||||
|
||||
How a Jellyfin (an integration of type `jellyfin`) is right now, one row each, replaced at every read (every two minutes). `integration_id` is the primary key and a foreign key with **cascade**.
|
||||
|
||||
Reference in new issue
Block a user