Jellyfin: who is watching, and don't update a machine mid-film

New Jellyfin integration (read-only, every 2 minutes): version, restart wanted,
streams and transcoding, failed scheduled tasks, item counts, failed sign-ins.
Monitoring -> Jellyfin page with a peak-streams history, three alerts, /metrics.

When Jellyfin runs on a managed server, an update run asks first if people are
streaming (409 "watching" unless startAnyway), and a patch plan waits up to two
hours for them before updating that server.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
bobbanandClaude Sonnet 5.5 committed 2026-10-24 22:01:18 +02:00
1 parent 2f082ca5c2
commit 0146eb8bca
38 files changed
+8136 -13

No files matched your search

+27
View File
@@ -0,0 +1,27 @@
CREATE TABLE `jellyfin_readings` (
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
`integration_id` integer NOT NULL,
`at` text NOT NULL,
`streams` integer NOT NULL,
`transcodes` integer NOT NULL,
FOREIGN KEY (`integration_id`) REFERENCES `integrations`(`id`) ON UPDATE no action ON DELETE cascade
);
--> statement-breakpoint
CREATE INDEX `jellyfin_readings_idx` ON `jellyfin_readings` (`integration_id`,`at`);--> statement-breakpoint
CREATE TABLE `jellyfin_state` (
`integration_id` integer PRIMARY KEY NOT NULL,
`server_name` text,
`version` text,
`os` text,
`pending_restart` integer DEFAULT false NOT NULL,
`update_available` integer DEFAULT false NOT NULL,
`streams` text DEFAULT '[]' NOT NULL,
`tasks` text DEFAULT '[]' NOT NULL,
`movies` integer,
`series` integer,
`episodes` integer,
`songs` integer,
`failed_logins_24h` integer,
`updated_at` text NOT NULL,
FOREIGN KEY (`integration_id`) REFERENCES `integrations`(`id`) ON UPDATE no action ON DELETE cascade
);