Monitoring Jellyfin Media System with the Jellyfin Exporter

The Jellyfin Exporter exposes a wide variety of metrics.

In this guide, you will:

  • Start up a Jellyfin Exporter on localhost
  • Start up a Prometheus instance on localhost that’s configured to scrape metrics from the running Jellyfin Exporter

Installing and running the Jellyfin Exporter

The Jellyfin Exporter is a single static binary that you can install via tarball. Once you’ve downloaded it from the downloads page extract it, and run it:

Current Release

Current Release

# NOTE: Replace the URL with one from the above mentioned "downloads" page.
# <VERSION>, <OS>, and <ARCH> are placeholders.
wget https://github.com/rebelcore/jellyfin_exporter/releases/download/v<VERSION>/jellyfin_exporter-<VERSION>.<OS>-<ARCH>.tar.gz
tar xvfz jellyfin_exporter-*.*-amd64.tar.gz
cd jellyfin_exporter-*.*-amd64
./jellyfin_exporter

You should see output like this indicating that the Node Exporter is now running and exposing metrics on port 9594:

caller=jellyfin_exporter.go:176 level=info msg="Starting jellyfin_exporter" version="(version=1.0.0, branch=HEAD, revision=96d9b649c014cacda5dd60883d335cb17e67f900)"
caller=jellyfin_exporter.go:177 level=info msg="Build context" build_context="(go=go1.22.7, platform=linux/amd64, user=root@0252ce7f94ff, date=20240910-22:11:32, tags=unknown)"
caller=jellyfin_exporter.go:96 level=info msg="Enabled collectors"
caller=jellyfin_exporter.go:103 level=info collector=media
caller=jellyfin_exporter.go:103 level=info collector=system
caller=tls_config.go:348 level=info msg="Listening on" address=[::]:9594
caller=tls_config.go:351 level=info msg="TLS is disabled." http2=false address=[::]:9594

Jellyfin Exporter metrics

Once the Jellyfin Exporter is installed and running, you can verify that metrics are being exported by cURLing the /metrics endpoint:

curl http://localhost:9594/metrics

You should see output like this:

# HELP go_gc_duration_seconds A summary of the GC invocation durations.
# TYPE go_gc_duration_seconds summary
go_gc_duration_seconds{quantile="0"} 3.8996e-05
go_gc_duration_seconds{quantile="0.25"} 4.5926e-05
go_gc_duration_seconds{quantile="0.5"} 5.846e-05
# etc.

Success! The Jellyfin Exporter is now exposing metrics that Prometheus can scrape, including a wide variety of metrics further down in the output (prefixed with jellyfin_). To view those metrics (along with help and type information):

curl http://localhost:9594/metrics | grep "jellyfin_"

Configuring your Prometheus instances

Your locally running Prometheus instance needs to be properly configured in order to access Node Exporter metrics. The following prometheus.yml example configuration file will tell the Prometheus instance to scrape, and how frequently, from the Node Exporter via localhost:9594:

global:
  scrape_interval: 15s

scrape_configs:
  - job_name: "jellyfin"
    metrics_path: /metrics
    static_configs:
      - targets: ["127.0.0.1:9594"]

To install Prometheus, download the latest release for your platform and untar it:

Prometheus Latest Release

wget https://github.com/prometheus/prometheus/releases/download/v*/prometheus-*.*-amd64.tar.gz
tar xvf prometheus-*.*-amd64.tar.gz
cd prometheus-*.*

Once Prometheus is installed you can start it up, using the --config.file flag to point to the Prometheus configuration that you created above:

./prometheus --config.file=./prometheus.yml

Exploring Jellyfin Exporter metrics through the Prometheus expression browser

Now that Prometheus is scraping metrics from a running Jellyfin Exporter instance, you can explore those metrics using the Prometheus UI. Navigate to localhost:9090/graph in your browser and use the main expression bar at the top of the page to enter expressions. The expression bar looks like this:

Prometheus expressions browser

Metrics specific to the Jellyfin Exporter are prefixed with jellyfin_ and include metrics like jellyfin_user_account and jellyfin_media_count.

Click on the links below to see some example metrics:

MetricMeaning
jellyfin_media_countAll media in your Jellyfin Media system by type.
jellyfin_user_account{admin="0"}List all users that do not have admin privileges.