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:
bobbanandClaude Sonnet 5.5 committed 2026-10-27 19:01:36 +01:00
1 parent f86661f6c9
commit 9a3d5c466a
29 files changed
+9836 -8

No files matched your search

+57 -1
View File
@@ -1326,6 +1326,57 @@ export interface HetznerForServer {
} | null;
}
export interface FragnetServerInfo {
/** The short id (8 characters) the game panel uses. */
id: string;
name: string;
description: string | null;
node: string | null;
/** The game, as the panel names it; null when it did not say. */
game: string | null;
dockerImage: string | null;
panelStatus: string | null;
suspended: boolean;
installing: boolean;
transferring: boolean;
owner: boolean;
/** running, starting, stopping, offline — or unknown when it could not be read. */
state: string;
allocations: { ip: string; alias: string | null; port: number; isDefault: boolean; notes: string | null }[];
sftp: string | null;
/** MB; 0 or null: no limit / not said. */
memoryLimitMb: number | null;
diskLimitMb: number | null;
cpuLimit: number | null;
databaseLimit: number | null;
backupLimit: number | null;
allocationLimit: number | null;
usage: { memoryBytes: number; cpu: number; diskBytes: number; rxBytes: number; txBytes: number; uptimeMs: number } | null;
/** Newest first; null when they could not be listed. */
backups: { uuid: string; name: string | null; bytes: number; createdAt: string | null; completedAt: string | null; successful: boolean; locked: boolean }[] | null;
schedules: { id: number; name: string; cron: string; active: boolean; processing: boolean; onlyWhenOnline: boolean; lastRunAt: string | null; nextRunAt: string | null }[] | null;
databases: number | null;
stateSince: string;
firstSeenAt: string;
/** The newest backup that worked, and whether a newer one failed; null when the backups could not be listed. */
newestBackup: { at: string | null; failedSince: boolean } | null;
}
/** One Fragnet game panel account (an integration of type fragnet), as its page shows it. */
export interface FragnetAccount {
id: number;
name: string;
enabled: boolean;
panelUrl: string;
status: { at: string; ok: boolean; error: string | null } | null;
fresh: boolean;
options: { backupDays: number; fullPercent: number; ignoreBackups: string[] };
state: { servers: FragnetServerInfo[]; updatedAt: string } | null;
problems: { key: string; serverId: string; message: string; severity: "warning" | "critical" }[];
}
export type FragnetSignal = "start" | "stop" | "restart" | "kill";
export interface CostItem {
id: number;
name: string;
@@ -2444,7 +2495,7 @@ export interface ManualTaskInput {
enabled?: boolean;
}
export type IntegrationType = "proxmox" | "synology" | "semaphore" | "tailscale" | "gitea" | "dockhand" | "uptimekuma" | "phpipam" | "pbs" | "osticket" | "unifi" | "npm" | "homeassistant" | "ups" | "jellyfin" | "authentik" | "prometheus" | "immich" | "paperless" | "nextcloud" | "netbox" | "n8n" | "hetzner" | "speedtest";
export type IntegrationType = "proxmox" | "synology" | "semaphore" | "tailscale" | "gitea" | "dockhand" | "uptimekuma" | "phpipam" | "pbs" | "osticket" | "unifi" | "npm" | "homeassistant" | "ups" | "jellyfin" | "authentik" | "prometheus" | "immich" | "paperless" | "nextcloud" | "netbox" | "n8n" | "hetzner" | "speedtest" | "fragnet";
export interface IntegrationField {
key: string;
@@ -3039,6 +3090,11 @@ export const api = {
list: () => request<{ speedtests: SpeedtestInfo[] }>("/api/speedtest"),
history: (id: number, days: number) => request<SpeedtestHistory>(`/api/speedtest/${id}/history?days=${days}`),
},
fragnet: {
list: () => request<{ accounts: FragnetAccount[] }>("/api/fragnet"),
power: (integrationId: number, serverId: string, signal: FragnetSignal) => request<void>(`/api/fragnet/${integrationId}/servers/${serverId}/power`, { method: "POST", body: JSON.stringify({ signal }) }),
refresh: (integrationId: number) => request<{ status: { ok: boolean; error: string | null } }>(`/api/fragnet/${integrationId}/refresh`, { method: "POST" }),
},
hetzner: {
list: () => request<{ projects: HetznerProject[] }>("/api/hetzner"),
forServer: (serverId: number) => request<HetznerForServer>(`/api/hetzner/for-server/${serverId}`),