downloader-exporter
A prometheus exporter for qBitorrent/Transmission/Deluge. Get metrics from multiple servers and offers them in a prometheus format.
How to use it
You can install this exporter with the following command:
pip3 install downloader-exporter
Then you can run it with
downloader-exporter -c CONFIG_FILE_PATH -p 9000
Another option is run it in a docker container.
docker run -d -v CONFIG_FILE_PATH:/config/config.yml -e EXPORTER_PORT=9000 -p 9000:9000 leishi1313/downloader-exporter
Add this to your prometheus.yml
- job_name: "downloader_exporter"
static_configs:
- targets: ['yourdownloaderexporter:port']
The exporter is running too slow
Use params
You can use params to collector metrics from one or more downloaders as you chose, for example
curl localhost:9000/metrics?name[]=qb1
Will only fetch downloader named qb1 in your config.
Then you can use multi-target-exporter to config your prometheus.
Use --multi
You can use an options to expose multiple ports for each downloader you're watching. Then the exporter will open a range of ports starting from the one you set, each port for each downloader
With command line
downloader-exporter -c CONFIG_FILE_PATH -p 9000 --multi true
With docker
docker run -d -v CONFIG_FILE_PATH:/config/config.yml -e EXPORTER_PORT=9000 -e USE_MULTI_PORTS=true -p 9000-9010:9000-9010 leishi1313/downloader-exporter
How to connect to Deluge
Deluge uses three ports for different operations:
- Incoming Port: Used by other torrent clients to connect to your instance.
- WebUI Port: Used to access the Deluge WebUI.
- Daemon Port: The one we need, this port is typically 58846, but you can confirm it by navigating to
Preferences -> Daemonin the Deluge WebUI.
To connect to the daemon, you'll need the daemon username and password. These credentials are stored in a file named auth, located in Deluge's config folder. You can view the file's contents using the following command:
root@f80e4787ec08: cat /config/auth
localclient:011cc7842dc8ad50f165ab712a8ef110e06fd7c0:10
In this example you can use localclient as user and 011cc7842dc8ad50f165ab712a8ef110e06fd7c0 as password to connect.
It's always different on your machine and you can add your choice of user/password by following the existing pattern.
Check more at Deluge Authentication
Config file
The config file is compatible with autoremove-torrents, you can also refer to example.yml to see how to write it.
Grafana
You can use the provided docker-compose.yml to host your own stack of Grafana/Prometheus/downloader-exporter.
Simplely clone this project, add or edit config.yml, then start the docker-compose:
cp example.yml config.yml
docker-compose up -d
Use localhost:3000 and admin/admin to access the dashboard.
First you will need to add a data source, select Prometheus with URL prometheus:9090, Then go and add a new dashboard with ID 15006 (use 22677 for English version), the dashboard should look like
Metadata
Release files for downloader-exporter 0.5.3.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| downloader_exporter-0.5.3.2.tar.gz | 3.1 kB | Without provenance | Details for downloader_exporter-0.5.3.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| downloader_exporter-0.5.3.2-py3-none-any.whl | Python 3 | none | any | Details for downloader_exporter-0.5.3.2-py3-none-any.whl |
Total release size: 7.1 kB
Release files / downloader_exporter-0.5.3.2.tar.gz
| Download URL | downloader_exporter-0.5.3.2.tar.gz |
|---|---|
| Size | 3.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b089c389e6f9fd06658e30c05355859fd861b78617e6afb718345b16240084c4
|
|
BLAKE2b-256 checksum How to use checksums |
407c0525d258bb91916a8a8d02b08554edac1e181154d7139603e0de08ba7188
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
pdm/2.22.3 CPython/3.13.2 Linux/6.8.0-1021-azure
|
Release files / downloader_exporter-0.5.3.2-py3-none-any.whl
| Download URL | downloader_exporter-0.5.3.2-py3-none-any.whl |
|---|---|
| Size | 3.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a9154a2e741cb41f7b79fb6a1d65361d0a26153c39af4b4632b08d231d715a8b
|
|
BLAKE2b-256 checksum How to use checksums |
99b379534b25ce813bb2f8a1c3949451377bb55a667b89706494fb84be66a9a7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
pdm/2.22.3 CPython/3.13.2 Linux/6.8.0-1021-azure
|
Security for downloader-exporter 0.5.3.2
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.