Prometheus, Immich and Paperless-ngx integrations
Three read-only integrations, each with a monitoring page, alerts, maintenance silencing and held-when-unreadable handling. Prometheus: scrape targets that stop answering (5 minutes, one alert per job) and alerts that Prometheus's own rules fire (critical when labelled so). Immich: disk under the library filling, failed background jobs, counts. Paperless-ngx: worker/database/Redis in error, documents that failed to import, index and sanity check, disk. Immich and Paperless also in /metrics. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
aebe98bf15
commit
251a4a9d73
47 files changed
+24148
-7
No files matched your search
+73
-1
@@ -1228,6 +1228,69 @@ export interface JellyfinInfo {
|
||||
problems: { key: string; message: string; severity: "warning" | "critical" }[];
|
||||
}
|
||||
|
||||
/** One Paperless-ngx, as its page shows it. */
|
||||
export interface PaperlessInfo {
|
||||
id: number;
|
||||
name: string;
|
||||
enabled: boolean;
|
||||
status: { at: string; ok: boolean; error: string | null } | null;
|
||||
fresh: boolean;
|
||||
state: {
|
||||
version: string | null;
|
||||
latestVersion: string | null;
|
||||
updateAvailable: boolean;
|
||||
storage: { total: number; available: number } | null;
|
||||
/** Null when the status could not be asked (it needs a superuser's token). */
|
||||
components: { name: string; status: string; error: string | null }[] | null;
|
||||
documents: number | null;
|
||||
inbox: number | null;
|
||||
/** Null when the tasks could not be asked. */
|
||||
failed: { file: string; error: string | null; at: string | null }[] | null;
|
||||
updatedAt: string;
|
||||
} | null;
|
||||
problems: { key: string; message: string; severity: "warning" | "critical" }[];
|
||||
}
|
||||
|
||||
/** One Immich, as its page shows it. */
|
||||
export interface ImmichInfo {
|
||||
id: number;
|
||||
name: string;
|
||||
enabled: boolean;
|
||||
status: { at: string; ok: boolean; error: string | null } | null;
|
||||
fresh: boolean;
|
||||
state: {
|
||||
version: string | null;
|
||||
latestVersion: string | null;
|
||||
updateAvailable: boolean;
|
||||
disk: { size: number; used: number; percent: number | null } | null;
|
||||
photos: number | null;
|
||||
videos: number | null;
|
||||
usageBytes: number | null;
|
||||
/** Null when the queues could not be asked. */
|
||||
queues: { name: string; active: number; waiting: number; failed: number; paused: boolean }[] | null;
|
||||
updatedAt: string;
|
||||
} | null;
|
||||
problems: { key: string; message: string; severity: "warning" | "critical" }[];
|
||||
}
|
||||
|
||||
/** One Prometheus, as its page shows it. */
|
||||
export interface PrometheusInfo {
|
||||
id: number;
|
||||
name: string;
|
||||
enabled: boolean;
|
||||
status: { at: string; ok: boolean; error: string | null } | null;
|
||||
fresh: boolean;
|
||||
state: {
|
||||
version: string | null;
|
||||
/** Null when the targets could not be asked. */
|
||||
jobs: { job: string; up: number; down: number }[] | null;
|
||||
down: { job: string; instance: string; error: string | null; since: string }[] | null;
|
||||
alerts: { name: string; severity: string | null; state: "firing" | "pending"; summary: string | null; instance: string | null; activeAt: string | null }[] | null;
|
||||
updatedAt: string;
|
||||
} | null;
|
||||
problems: { key: string; message: string; severity: "warning" | "critical" }[];
|
||||
}
|
||||
|
||||
/** One Authentik, as its page shows it. */
|
||||
export interface AuthentikInfo {
|
||||
id: number;
|
||||
@@ -2171,7 +2234,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";
|
||||
export type IntegrationType = "proxmox" | "synology" | "semaphore" | "tailscale" | "gitea" | "dockhand" | "uptimekuma" | "phpipam" | "pbs" | "osticket" | "unifi" | "npm" | "homeassistant" | "ups" | "jellyfin" | "authentik" | "prometheus" | "immich" | "paperless";
|
||||
|
||||
export interface IntegrationField {
|
||||
key: string;
|
||||
@@ -2718,6 +2781,15 @@ export const api = {
|
||||
update: (id: number, data: ServiceLevelInput) => request<{ ok: boolean }>(`/api/service-levels/${id}`, { method: "PUT", body: JSON.stringify(data) }),
|
||||
remove: (id: number) => request<void>(`/api/service-levels/${id}`, { method: "DELETE" }),
|
||||
},
|
||||
paperless: {
|
||||
list: () => request<{ paperlesses: PaperlessInfo[] }>("/api/paperless"),
|
||||
},
|
||||
immich: {
|
||||
list: () => request<{ immiches: ImmichInfo[] }>("/api/immich"),
|
||||
},
|
||||
prometheus: {
|
||||
list: () => request<{ prometheuses: PrometheusInfo[] }>("/api/prometheus"),
|
||||
},
|
||||
authentik: {
|
||||
list: () => request<{ authentiks: AuthentikInfo[] }>("/api/authentik"),
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user