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
@@ -554,6 +554,7 @@ export const integrationTypes = [
|
||||
"homeassistant",
|
||||
"ups",
|
||||
"jellyfin",
|
||||
"authentik",
|
||||
] as const;
|
||||
export type IntegrationType = (typeof integrationTypes)[number];
|
||||
|
||||
@@ -1160,6 +1161,27 @@ export const haReadings = sqliteTable(
|
||||
(t) => [index("ha_readings_lookup_idx").on(t.integrationId, t.entityId, t.at)],
|
||||
);
|
||||
|
||||
// ─── Authentik ──────────────────────────────────────────────────────────────
|
||||
|
||||
// How an Authentik (an integration of type "authentik") is right now, one row each, replaced at every read: its version, whether a worker is connected, how each outpost is, the
|
||||
// certificates and tokens that run out, and how many sign-ins and flows failed lately. Read by services/authentikSync.ts.
|
||||
export const authentikState = sqliteTable("authentik_state", {
|
||||
integrationId: integer("integration_id")
|
||||
.primaryKey()
|
||||
.references(() => integrations.id, { onDelete: "cascade" }),
|
||||
version: text("version"),
|
||||
latestVersion: text("latest_version"),
|
||||
outdated: integer("outdated", { mode: "boolean" }).notNull().default(false),
|
||||
workers: integer("workers"), // null: could not be asked
|
||||
outposts: text("outposts").notNull().default("[]"), // JSON: name, type, providers, healthy, instances, outdated, lastSeen
|
||||
certificates: text("certificates").notNull().default("[]"), // JSON: name, expires
|
||||
tokens: text("tokens").notNull().default("[]"), // JSON: identifier, intent, user, expires
|
||||
failedLogins24h: integer("failed_logins_24h"),
|
||||
configErrors24h: integer("config_errors_24h"),
|
||||
lastConfigError: text("last_config_error"),
|
||||
updatedAt: text("updated_at").notNull(), // ISO
|
||||
});
|
||||
|
||||
// ─── Jellyfin ───────────────────────────────────────────────────────────────
|
||||
|
||||
// How a Jellyfin server (an integration of type "jellyfin") is right now, one row each, replaced at every read: its version, whether it wants a restart, who is streaming, how its
|
||||
|
||||
Reference in new issue
Block a user