Add Hetzner Robot: dedicated servers and storage boxes, with shutting-down, locked and rescue-left-on alerts
Read every 15 minutes (Robot allows 200 requests an hour; read-only): each server's product, addresses, status, rescue system and paid-until, and the storage boxes. Adapter, sync service, hetzner_robot_state table, /api/hetzner-robot, Infrastructure → Hetzner Robot page, metrics and docs. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
7618bf0f0a
commit
01acbaf831
31 files changed
+10105
-10
No files matched your search
@@ -580,6 +580,7 @@ export const integrationTypes = [
|
||||
"readarr",
|
||||
"qbittorrent",
|
||||
"sabnzbd",
|
||||
"hetznerrobot",
|
||||
] as const;
|
||||
export type IntegrationType = (typeof integrationTypes)[number];
|
||||
|
||||
@@ -1392,6 +1393,21 @@ export const downloadState = sqliteTable("download_state", {
|
||||
updatedAt: text("updated_at").notNull(), // ISO
|
||||
});
|
||||
|
||||
// ─── Hetzner Robot ──────────────────────────────────────────────────────────
|
||||
|
||||
// How a Hetzner Robot account (an integration of type "hetznerrobot") is right now, one row each, replaced at every read: its dedicated servers (each with since when its rescue system has been on and
|
||||
// since when it has not been "ready", which only this app can know) and its storage boxes. A column that is null could not be read, which is not the same as none. Read by
|
||||
// services/hetznerRobotSync.ts.
|
||||
export const hetznerRobotState = sqliteTable("hetzner_robot_state", {
|
||||
integrationId: integer("integration_id")
|
||||
.primaryKey()
|
||||
.references(() => integrations.id, { onDelete: "cascade" }),
|
||||
servers: text("servers").notNull().default("[]"), // JSON: the dedicated servers, with rescueSince and notReadySince carried from read to read
|
||||
storageBoxes: text("storage_boxes"), // JSON; null: could not be read
|
||||
skippedDetail: integer("skipped_detail").notNull().default(0), // servers not asked about their rescue system (too many for Robot's request limit)
|
||||
updatedAt: text("updated_at").notNull(), // ISO
|
||||
});
|
||||
|
||||
// ─── AdGuard Home ───────────────────────────────────────────────────────────
|
||||
|
||||
// How an AdGuard Home (an integration of type "adguard") is right now, one row each, replaced at every read: whether its DNS server runs and protects, the statistics, its filter lists and the result
|
||||
|
||||
Reference in new issue
Block a user