Hetzner Cloud integration: servers, traffic quota, backups, volumes and cost
One integration per project (read-only API token, read every 5 minutes). Alerts for a server that was running and is off, stuck statuses, traffic at 80%/100% of the monthly quota, rescue mode left on, and late backups. The Hetzner page lists servers, volumes, snapshots and a cost estimate; a server the app knows by its agent gets a Hetzner card on its own page. /metrics and docs updated. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
5a2b320175
commit
24b708abbe
35 files changed
+9430
-7
No files matched your search
@@ -561,6 +561,7 @@ export const integrationTypes = [
|
||||
"nextcloud",
|
||||
"netbox",
|
||||
"n8n",
|
||||
"hetzner",
|
||||
] as const;
|
||||
export type IntegrationType = (typeof integrationTypes)[number];
|
||||
|
||||
@@ -1218,6 +1219,21 @@ export const nextcloudState = sqliteTable("nextcloud_state", {
|
||||
updatedAt: text("updated_at").notNull(), // ISO
|
||||
});
|
||||
|
||||
// ─── Hetzner Cloud ──────────────────────────────────────────────────────────
|
||||
|
||||
// How a Hetzner Cloud project (an integration of type "hetzner"; a token belongs to one project) is right now, one row each, replaced at every read: its servers, volumes, snapshots and
|
||||
// backups as JSON, and a cost estimate. A column that is null could not be read — which is not the same as none. Read by services/hetznerSync.ts.
|
||||
export const hetznerState = sqliteTable("hetzner_state", {
|
||||
integrationId: integer("integration_id")
|
||||
.primaryKey()
|
||||
.references(() => integrations.id, { onDelete: "cascade" }),
|
||||
servers: text("servers").notNull().default("[]"), // JSON: each server as read, plus when it was last seen running, since when it has had this status and since when rescue mode has been on
|
||||
volumes: text("volumes"), // JSON; null: could not be asked
|
||||
images: text("images"), // JSON: snapshots and backups; null: could not be asked
|
||||
cost: text("cost"), // JSON: the monthly estimate (currency, servers, backups, volumes, snapshots, IPs, total); null: could not be worked out (no price list)
|
||||
updatedAt: text("updated_at").notNull(), // ISO
|
||||
});
|
||||
|
||||
// ─── NetBox ─────────────────────────────────────────────────────────────────
|
||||
|
||||
// How a NetBox (an integration of type "netbox") is right now, one row each, replaced at every read: its version, how many background workers are running, the counts and the IP
|
||||
|
||||
Reference in new issue
Block a user