README.md - jellyfin-exporter - jellyfin prometheus exporter
HTML git clone https://git.drkhsh.at/jellyfin-exporter.git
DIR Log
DIR Files
DIR Refs
DIR README
DIR LICENSE
---
README.md (1629B)
---
1 # jellyfin-exporter
2
3 This is a Prometheus (https://prometheus.io) metrics exporter for Jellyfin
4 (https://jellyfin.org).
5
6 ## Configuration
7
8 This exporter is configured via environment variables:
9
10 - `JELLYFIN_BASEURL`: Jellyfin server address (**required**)
11 - `JELLYFIN_APIKEY`: Jellyfin API key (**required**)
12 - `JELLYFIN_EXPORTER_PORT`: The port on which the exporter listens
13 (default `9027`)
14
15 ## Running
16
17 ### Using docker
18
19 ```
20 $ docker run \
21 -e JELLYFIN_BASEURL=http(s)://<jellyfin address>:<port> \
22 -e JELLYFIN_APIKEY=<apikey> \
23 -p 9027:9027 \
24 -d --restart=always \
25 -n jellyfin_exporter \
26 drkhsh/jellyfin-exporter:dev
27 ```
28
29 ### Using docker-compose
30
31 See [docker-compose file](docker-compose.yml).
32
33 ### Using package manager
34
35 Install dependencies, e.g. using:
36
37 ```
38 # apt install python3-prometheus-client
39 ```
40
41 ### Manually
42
43 1. Create a new python virtual environment: `python3 -m venv .venv`
44 2. Install required modules into your venv:
45 `./.venv/bin/pip3 install -r requirements.txt`
46 3. Start the exporter:
47
48 ```
49 JELLYFIN_BASEURL=http://<jellyfin address>:<port> JELLYFIN_APIKEY=<apikey> \
50 ./.venv/bin/python3 jellyfin_exporter.py
51 ```
52
53 ### systemd service
54
55 see `jellyfin-exporter.service` in *contrib* directory.
56 change the environment vars accordingly in a service override
57
58 ## Exported Metrics
59
60 Common labels:
61 - jellyfin_instance (`JELLYFIN_BASEURL`)
62
63 General metrics:
64 - jellyfin_streams
65 - jellyfin_sessions
66 - jellyfin_sessions_count
67 - jellyfin_sessions_count_active
68 - jellyfin_active_streams_count
69 - jellyfin_active_streams_count_direct
70 - jellyfin_active_streams_count_transcode
71 - jellyfin_item_counts