Skip to main content

emby_exporter.py

A prometheus exporter for emby written in Python 3. The exporter scrapes emby's API and exposes prometheus metrics. emby_exporter will call the API every 15 seconds by default, this can be adjusted through commandline arguments.

Grafana Dashboard See grafana_dashboard.json

Content

Metrics

  • info
  • library_size
  • devices
  • genres
  • production year
  • played
  • favourites

Metrics Example

    # HELP python_info Python platform information
    # TYPE python_info gauge
    python_info{implementation="CPython",major="3",minor="7",patchlevel="0",version="3.7.0"} 1.0
    # HELP emby_info emby info
    # TYPE emby_info gauge
    emby_info{id="5924731cb9904e3b9862475bad630a50",local_address="http://192.168.0.5:8096",operating_system="Linux",server_name="rpi3",version="3.5.2.0",wan_address="http://146.128.69.118:8096"} 1.0
    # HELP emby_library_size emby library size
    # TYPE emby_library_size gauge
    emby_library_size{type="movies"} 969.0
    emby_library_size{type="series"} 141.0
    emby_library_size{type="episodes"} 8873.0
    emby_library_size{type="albums"} 0.0
    emby_library_size{type="artists"} 0.0
    emby_library_size{type="songs"} 0.0

Setup

pip

pip3 install --upgrade emby_exporter

manual

git clone https://github.com/dr1s/emby_exporter.py.git
cd emby_exporter.py
pip3 install -r requirements.txt
cd emby_exporter
./emby_exporter.py

Docker

docker-hub

docker pull dr1s/emby_exporter:latest
docker run --net=host -t dr1s/emby_exporter

manual

git clone https://github.com/dr1s/emby_exporter.py.git
docker build -t dr1s/emby_exporter .
docker run -d -p 9123:9123 -t dr1s/emby_exporter

Usage

usage: emby_exporter.py [-h] [-e EMBY] [-p PORT] [-i INTERFACE] [-a AUTH]
                        [-u USERID] [-s INTERVAL]

emby_exporter

optional arguments:
  -h, --help            show this help message and exit
  -e EMBY, --emby EMBY  emby adress
  -p PORT, --port PORT  port emby_exporter is listening on
  -i INTERFACE, --interface INTERFACE
                        interface emby_exporter will listen on
  -a AUTH, --auth AUTH  emby api token
  -u USERID, --userid USERID
                        emby user id
  -s INTERVAL, --interval INTERVAL
                        scraping interval in seconds

Usage Example

emby_exporter --emby localhost:8069 --interface 0.0.0.0 --port 9123 --interval 15 --auth <emby_api_token> --userid <emby_user_id>

The previous used arguements are the default options. All options are options except for the emby api token and userid.

Metadata

Release files for emby-exporter 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for emby-exporter 0.1.4
File Size Uploaded Provenance Actions
emby_exporter-0.1.4.tar.gz 4.7 kB Without provenance Details for emby_exporter-0.1.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for emby-exporter 0.1.4
File Interpreter ABI Platform Actions
emby_exporter-0.1.4-py2.py3-none-any.whl Python 3, Python 2 none any Details for emby_exporter-0.1.4-py2.py3-none-any.whl

Total release size: 11.5 kB

Release files / emby_exporter-0.1.4.tar.gz

Download URL emby_exporter-0.1.4.tar.gz
Size 4.7 kB
Tags Source
SHA-256 checksum
How to use checksums
cfb5d3f6936fa74ba6c6a8a464cb3bde919d0ec0493b10681fd4d4744e804b30
BLAKE2b-256 checksum
How to use checksums
8f9aff96c539ec5ba51a238e7c9f5e13298d3f46f377962175330e642d4a9a1e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.7.0 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.7.0

Release files / emby_exporter-0.1.4-py2.py3-none-any.whl

Download URL emby_exporter-0.1.4-py2.py3-none-any.whl
Size 6.8 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
893a8ebc284f9f4c5c103b4e92556dcb7e21f9ac7d0817386eeda47dffd7d7d6
BLAKE2b-256 checksum
How to use checksums
8d09c4348a97f66434b7eed620d86013e91e2074240467e769702948077edb25
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.7.0 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.7.0

Security for emby-exporter 0.1.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page