Prometheus qBittorrent exporter
A prometheus exporter for qBittorrent. Get metrics from a server and offers them in a prometheus format.
How to use it
You can install this exporter with the following command:
pip3 install prometheus-qbittorrent-exporter
Then you can run it with
qbittorrent-exporter
Another option is run it in a docker container.
docker run \
-e QBITTORRENT_PORT=8080 \
-e QBITTORRENT_HOST=myserver.local \
-p 8000:8000 \
ghcr.io/esanchezm/prometheus-qbittorrent-exporter
Add this to your prometheus.yml
- job_name: "qbittorrent_exporter"
static_configs:
- targets: ['yourqbittorrentexporter:port']
The application reads configuration using environment variables:
| Environment variable | Default | Description |
|---|---|---|
QBITTORRENT_HOST |
qbittorrent server hostname | |
QBITTORRENT_PORT |
qbittorrent server port | |
QBITTORRENT_SSL |
False |
Whether to use SSL to connect or not. Will be forced to True when using port 443 |
QBITTORRENT_URL_BASE |
"" |
qbittorrent server path or base URL |
QBITTORRENT_USER |
"" |
qbittorrent username |
QBITTORRENT_PASS |
"" |
qbittorrent password |
QBITTORRENT_API_KEY |
"" |
qBittorrent API key for qBittorrent >= 5.2. When set, it overrides QBITTORRENT_USER/QBITTORRENT_PASS. |
EXPORTER_ADDRESS |
0.0.0.0 |
Exporter listening IP address |
EXPORTER_PORT |
8000 |
Exporter listening port |
EXPORTER_LOG_LEVEL |
INFO |
Log level. One of: DEBUG, INFO, WARNING, ERROR, CRITICAL |
METRICS_PREFIX |
qbittorrent |
Prefix to add to all the metrics |
VERIFY_WEBUI_CERTIFICATE |
True |
Whether to verify SSL certificate when connecting to the qbittorrent server. Any other value but True will disable the verification |
Metrics
These are the metrics this program exports, assuming the METRICS_PREFIX is qbittorrent:
| Metric name | Type | Description |
|---|---|---|
qbittorrent_up |
gauge | Whether the qBittorrent server is answering requests from this exporter. A version label with the server version is added. |
qbittorrent_connected |
gauge | Whether the qBittorrent server is connected to the Bittorrent network. |
qbittorrent_firewalled |
gauge | Whether the qBittorrent server is connected to the Bittorrent network but is behind a firewall. |
qbittorrent_dht_nodes |
gauge | Number of DHT nodes connected to. |
qbittorrent_total_peer_connections |
gauge | Total number of peer connections. |
qbittorrent_dl_info_data |
counter | Data downloaded since the server started, in bytes. |
qbittorrent_up_info_data |
counter | Data uploaded since the server started, in bytes. |
qbittorrent_alltime_dl_total |
counter | Total historical data downloaded, in bytes. |
qbittorrent_alltime_ul_total |
counter | Total historical data uploaded, in bytes. |
qbittorrent_torrents_count |
gauge | Number of torrents for each category and status. Example: qbittorrent_torrents_count{category="movies",status="downloading"} |
Screenshot
License
This software is released under the GPLv3 license.
Metadata
Release files for prometheus-qbittorrent-exporter 1.8.0
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 |
|---|---|---|---|---|
| prometheus_qbittorrent_exporter-1.8.0.tar.gz | 21.9 kB | Without provenance | Details for prometheus_qbittorrent_exporter-1.8.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| prometheus_qbittorrent_exporter-1.8.0-py3-none-any.whl | Python 3 | none | any | Details for prometheus_qbittorrent_exporter-1.8.0-py3-none-any.whl |
Total release size: 41.2 kB
Release files / prometheus_qbittorrent_exporter-1.8.0.tar.gz
| Download URL | prometheus_qbittorrent_exporter-1.8.0.tar.gz |
|---|---|
| Size | 21.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
141a9ae12ebc7c56113142bc4056c8f48e60958b643764f2171e0ca669e5ba00
|
|
BLAKE2b-256 checksum How to use checksums |
cfb4f9109606595a5d33f1090ee4e0140e0fd7598c200bc333630d5ad3470357
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.18
|
Release files / prometheus_qbittorrent_exporter-1.8.0-py3-none-any.whl
| Download URL | prometheus_qbittorrent_exporter-1.8.0-py3-none-any.whl |
|---|---|
| Size | 19.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2a0b95f841e42e31900737c77247e590aab5527ed5d378b4bd00a252dea423c2
|
|
BLAKE2b-256 checksum How to use checksums |
20e60cbd30ae9c6d6074400ec6bf4715a009b74e09d66da24d60ea744a3543da
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.18
|
Security for prometheus-qbittorrent-exporter 1.8.0
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.