This is a Prometheus (https://prometheus.io) metrics exporter for Jellyfin (https://jellyfin.org).
This exporter is configured via environment variables:
JELLYFIN_BASEURL
: Jellyfin server address (required)JELLYFIN_APIKEY
: Jellyfin API key (required)JELLYFIN_EXPORTER_PORT
: The port on which the exporter listens (default9027
)
$ docker run \
-e JELLYFIN_BASEURL=http(s)://<jellyfin address>:<port> \
-e JELLYFIN_APIKEY=<apikey> \
-p 9027:9027 \
-d --restart=always \
-n jellyfin_exporter \
drkhsh/jellyfin-exporter:dev
See docker-compose file.
Install dependencies, e.g. using:
# apt install python3-prometheus-client
- Create a new python virtual environment:
python3 -m venv .venv
- Install required modules into your venv:
./.venv/bin/pip3 install -r requirements.txt
- Start the exporter:
JELLYFIN_BASEURL=http://<jellyfin address>:<port> JELLYFIN_APIKEY=<apikey> \
./.venv/bin/python3 jellyfin_exporter.py
see jellyfin-exporter.service
in contrib directory.
change the environment vars accordingly in a service override
Common labels:
- jellyfin_instance (
JELLYFIN_BASEURL
)
General metrics:
- jellyfin_streams
- jellyfin_sessions
- jellyfin_sessions_count
- jellyfin_sessions_count_active
- jellyfin_active_streams_count
- jellyfin_active_streams_count_direct
- jellyfin_active_streams_count_transcode
- jellyfin_item_counts