Prometheus exporter for Jellyfin Media System metrics exposed in Go with pluggable metric collectors.
If you are new to Prometheus and jellyfin_exporter there is
a simple step-by-step guide.
The jellyfin_exporter listens on HTTP port 9594 by default.
See the --help output for more options.
The flag --jellyfin.token is required. You can generate an API
Key in the Jellyfin admin dashboard.
If you want to use ENV based flags you can use the following.
JELLYFIN_ADDRESS=http://localhost:8096
JELLYFIN_TOKEN=TOKENComing Soon!
The jellyfin_exporter is designed to monitor your Jellyfin Media System.
For situations where containerized deployment is needed, you will need to set the Jellyfin URL flag to use the docker container hostname.
docker run -d \
-p 9594:9594 \
rebelcore/jellyfin-exporter:latest \
--jellyfin.address=http://jellyfin:8096 \
--jellyfin.token=TOKENFor Docker compose, similar flag changes are needed.
---
services:
jellyfin_exporter:
image: rebelcore/jellyfin-exporter:latest
container_name: jellyfin_exporter
command:
- '--jellyfin.address=http://jellyfin:8096'
- '--jellyfin.token=TOKEN'
ports:
- 9594:9594
restart: unless-stoppedRefer to this repository to check out the official dashboard for the exporter.
There is varying support for collectors. The tables below list all existing collectors.
Collectors are enabled by providing a --collector.<name> flag.
Collectors that are enabled by default can be disabled
by providing a --no-collector.<name> flag.
To enable only some specific collector(s),
use --collector.disable-defaults --collector.<name> ....
| Name | Description |
|---|---|
| media | Exposes media totals in the system by type. |
| playing | Exposes media that users are now playing. |
| system | Exposes if the Jellyfin server is online or not. |
| users | Exposes users and if they are currently connected. |
jellyfin_exporter also implements a number of collectors that
are disabled by default. Reasons for this vary by collector,
and may include:
- Plugin Required
You can enable additional collectors as desired by adding them
to your init system's or service supervisor's startup configuration
for jellyfin_exporter but caution is advised. Enable at most one
at a time, testing first on a non-production system, then by hand
on a single production node. When enabling additional collectors,
you should carefully monitor the change by observing the
scrape_duration_seconds metric to ensure that collection completes
and does not time out. In addition, monitor the
scrape_samples_post_metric_relabeling metric to see the changes
in cardinality.
| Name | Description |
|---|---|
| activity | Exposes information from the Playback Reporting plugin. |
The activity collector can be enabled with --collector.activity.
It supports exposing metrics from the Playback Reporting plugin.
To use this collector you will need to enable the plugin first and
edit the setting Keep data for and set it to Forever. The option
collector.activity.days is set to 100 years in days by default to
show the max amount of data. You can modify the amount of days to pull
from, but it's recommended to leave it at its default for best data reporting.
The jellyfin_exporter will expose all metrics from enabled collectors
by default. This is the recommended way to collect metrics to avoid errors.
For advanced use the jellyfin_exporter can be passed an optional list
of collectors to filter metrics. The collect[] parameter may be used
multiple times. In Prometheus configuration you can use this syntax under
the scrape config.
params:
collect[]:
- foo
- bar
This can be useful for having different Prometheus servers collect specific metrics from nodes.
Prerequisites:
- Go compiler
- RHEL/CentOS:
glibc-staticpackage.
Building:
git clone https://github.com/rebelcore/jellyfin_exporter.git
cd jellyfin_exporter
make build
./jellyfin_exporter <flags>
To see all available configuration flags:
./jellyfin_exporter --help
make test
EXPERIMENTAL
The exporter supports TLS via a new web configuration file.
./jellyfin_exporter --web.config.file=web-config.ymlSee the exporter-toolkit web-configuration for more details.