Skip to main content

Export emby metrics for prometheus

Project description

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 --net=host -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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

emby_exporter-0.1.1.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

emby_exporter-0.1.1-py2.py3-none-any.whl (5.5 kB view details)

Uploaded Python 2Python 3

File details

Details for the file emby_exporter-0.1.1.tar.gz.

File metadata

  • Download URL: emby_exporter-0.1.1.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for emby_exporter-0.1.1.tar.gz
Algorithm Hash digest
SHA256 7d494b99a467e69d086607db7e2cdd5452f0c676d87a1d1c2fe7399c7d6dcf4c
MD5 941427427abbb8eed2f0bcb2fc74c21e
BLAKE2b-256 fe31377d556007d3cad1e4114b37ce91fdae8cb278ce9af6384f2053c4b26205

See more details on using hashes here.

File details

Details for the file emby_exporter-0.1.1-py2.py3-none-any.whl.

File metadata

  • Download URL: emby_exporter-0.1.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 2, Python 3
  • Uploaded using 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

File hashes

Hashes for emby_exporter-0.1.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 6b9c55caa6642f8c4fde0b814852bb830c6ef0b2c4f67ae328de5e55bca99d92
MD5 e963357e1ec90cda287938a00dfc269b
BLAKE2b-256 af2d2b1af3467d0a936f0a19f142e7e1577d51d83790000d8d051bf81a847e47

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page