Prometheus metrics exporter for Jellyfin
  • Go 98.7%
  • Dockerfile 1.3%
Find a file
George Grainger ad18c2c8e6
All checks were successful
Docker Image CI / build (push) Successful in 1m25s
Update for forgejo actions
2026-05-29 18:17:44 +01:00
.forgejo/workflows Update for forgejo actions 2026-05-29 18:17:44 +01:00
.vscode Initalise repository 2024-04-20 20:52:39 +01:00
api Add more information about episodes 2024-07-08 20:36:44 +01:00
collectors Add more information about episodes 2024-07-08 20:36:44 +01:00
.gitignore Add basic cli setup 2024-04-20 21:26:32 +01:00
Dockerfile Fix build warnings 2026-03-12 20:32:23 +00:00
go.mod Add prometheus metrics endpoint 2024-04-20 21:34:47 +01:00
go.sum Add prometheus metrics endpoint 2024-04-20 21:34:47 +01:00
main.go Add environment variable for port 2024-04-23 20:19:23 +01:00
README.md Fix README link 2026-03-12 20:37:11 +00:00

Jellyfin-Prometheus-Exporter

A prometheus metrics exporter for Jellyfin.

Jellyfin does provide a metrics endpoint of it's own, but it doesn't provide any useful metrics aside from memory usage.

Metrics

This exporter uses the Jellyfin REST API to generate metrics:

  • Number of active sessions
    • Device client (Jellyfin Web, etc)
  • Number of active streams
    • Media type (Video, Audio, etc)
    • Type (Movie, Episode, etc)
    • Stream type (transcoded, direct play)
    • Codec (hvec, h264)
  • Number of items in each library
    • Container
    • Type (Movie, Epioside, etc)
  • Number of user accounts
    • Is Admin
    • Authentication provider

Configuration

The exporter is configured using environment variables

Variable Default Description
JELLYFIN_URL The url to reach the Jellyfin deployment, e.g. https://jellyfin.example.com
JELLYFIN_API_KEY The API token to use when interacting with the Jellyfin API
PORT 2112 The port to host on

Deployment

A docker image for this exporter is provided ghcr.io/randomman552/jellyfin-prometheus-exporter.

An example docker compose is provided below

version: "3"
services:
  jellyfin-exporter:
    image: rghcr.io/randomman552/jellyfin-prometheus-exporter
    restart: unless-stopped
    environment:
      JELLYFIN_URL: https://jellyfin.example.com
      JELLYFIN_API_KEY: V3rySecretK3y
      PORT: 2112
    ports:
      - 2112:2112

You will probably want to set this up with a reverse proxy such as Traefik.