https://github.com/jsclayton/prometheus-plex-exporter
Export metrics from your Plex Media Server
https://github.com/jsclayton/prometheus-plex-exporter
grafana grafana-agent plex plex-media-server prometheus prometheus-exporter
Last synced: 4 months ago
JSON representation
Export metrics from your Plex Media Server
- Host: GitHub
- URL: https://github.com/jsclayton/prometheus-plex-exporter
- Owner: jsclayton
- License: agpl-3.0
- Created: 2023-03-18T21:52:35.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-08-21T16:07:42.000Z (almost 2 years ago)
- Last Synced: 2025-11-23T06:02:51.483Z (7 months ago)
- Topics: grafana, grafana-agent, plex, plex-media-server, prometheus, prometheus-exporter
- Language: Go
- Homepage:
- Size: 1.57 MB
- Stars: 148
- Watchers: 7
- Forks: 22
- Open Issues: 17
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- Self-Hosting-Guide - Prometheus Exporter for Plex
README
# Prometheus Exporter for Plex
Expose library playback, storage, and host metrics in a Prometheus format.
# Configuration
The exporter is configured via required environment variables:
- `PLEX_SERVER`: The full URL where your server can be reached, including the scheme and port (if not 80 or 443). For example `http://192.168.0.10:32400` or `https://my.plex.tld`.
- `PLEX_TOKEN`: A [Plex token](https://support.plex.tv/articles/204059436-finding-an-authentication-token-x-plex-token/) belonging to the server administrator.
# Running
The exporter runs via Docker:
```bash
docker run \
-name prom-plex-exporter \
-p 9000:9000 \
-e PLEX_SERVER="" \
-e PLEX_TOKEN="" \
ghcr.io/jsclayton/prometheus-plex-exporter
```
Or via Docker Compose:
```yaml
prom-plex-exporter:
image: ghcr.io/jsclayton/prometheus-plex-exporter
ports:
- 9000:9000/tcp
environment:
PLEX_SERVER:
PLEX_TOKEN:
```
A sample dashboard can be found in the [examples](examples/dashboards/Media%20Server.json)
# Exporting Metrics
The simplest way to start visualizaing your metrics is with the Free Forever [Grafana Cloud](https://grafana.com/docs/grafana-cloud/) and [Grafana Agent](https://grafana.com/docs/agent/latest/).
Here's an example config file that will read metrics from the exporter and ship them to [Prometheus](https://grafana.com/docs/grafana-cloud/data-configuration/metrics/metrics-prometheus/) via `remote_write`:
```yaml
metrics:
configs:
- name: prom-plex
scrape_configs:
- job_name: prom-plex
static_configs:
- targets:
-
remote_write:
- url:
basic_auth:
username:
password:
```