Queries nvidia-smi of a different container (jellyfin) and exposes as prometheus metrics.
178
A lightweight Prometheus exporter that monitors the NVIDIA GPU usage inside a running Jellyfin Docker container.
This exporter runs independently, calls nvidia-smi inside the Jellyfin container using docker exec, and exposes metrics on /metrics for Prometheus scraping.
git clone https://github.com/youruser/jellyfin-gpu-exporter.git
cd jellyfin-gpu-exporter
docker build -t ajwest3d/jellyfin-gpu-exporter:latest .
docker run -d \
--name jellyfin-gpu-exporter \
-e TARGET_CONTAINER=jellyfin \
-e EXPORTER_PORT=9109 \
-v /var/run/docker.sock:/var/run/docker.sock \
-p 9109:9109 \
ajwest3d/jellyfin-gpu-exporter:latest
TARGET_CONTAINER: Name of your Jellyfin container (default: jellyfin)EXPORTER_PORT: Port to expose metrics on (default: 9109)๐ Note: Mounting Docker socket allows this container to run
docker execcommands into Jellyfin. Only do this on trusted hosts.
| Metric Name | Description |
|---|---|
jellyfin_gpu_ok | 1 if GPU is available, else 0 |
jellyfin_gpu_memory_used_mebibytes | Memory used (MiB) |
jellyfin_gpu_memory_total_mebibytes | Total memory (MiB) |
jellyfin_gpu_utilization_percent | GPU usage (%) |
jellyfin_gpu_temperature_celsius | GPU temp (ยฐC) |
jellyfin_gpu_power_draw_watts | Estimated power usage (W) |
jellyfin_gpu_process_count | Number of active GPU processes |
jellyfin_gpu_exporter_errors_total | Exporter errors total counter |
- job_name: 'jellyfin-gpu'
static_configs:
- targets: ['localhost:9109']
Visit the metrics endpoint in a browser:
http://localhost:9109/metrics
You should see all metrics in Prometheus format.
MIT
Built with โค๏ธ by @ajwest3dโ
Content type
Image
Digest
sha256:3651037f0โฆ
Size
211.7 MB
Last updated
over 1 year ago
docker pull ajwest3d/jellyfin-gpu-exporter:v1