esanchezm
prometheus-qbittorrent-exporter
Python

A prometheus exporter for qbittorrent written in Python. Simple. Works. Docker image

Last updated Aug 5, 2026
195
Stars
45
Forks
16
Issues
+1
Stars/day
Attention Score
52
Language breakdown
Python 97.7%
Dockerfile 2.3%
โ–ธ Files click to expand
README

Prometheus qBittorrent exporter

A prometheus exporter for qBittorrent. Get metrics from a server and offers them in a prometheus format.

Coverage badge

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
- jobname: "qbittorrentexporter"
    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 | | QBITTORRENTURLBASE | "" | qbittorrent server path or base URL | | QBITTORRENT_USER | "" | qbittorrent username | | QBITTORRENT_PASS | "" | qbittorrent password | | QBITTORRENTAPIKEY | "" | qBittorrent API key for qBittorrent >= 5.2. When set, it overrides QBITTORRENTUSER/QBITTORRENTPASS. | | EXPORTER_ADDRESS | 0.0.0.0 | Exporter listening IP address | | EXPORTER_PORT | 8000 | Exporter listening port | | EXPORTERLOGLEVEL | INFO | Log level. One of: DEBUG, INFO, WARNING, ERROR, CRITICAL | | METRICS_PREFIX | qbittorrent | Prefix to add to all the metrics | | VERIFYWEBUICERTIFICATE | 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. | | qbittorrentdhtnodes | gauge | Number of DHT nodes connected to. | | qbittorrenttotalpeer_connections | gauge | Total number of peer connections. | | qbittorrentdlinfo_data | counter | Data downloaded since the server started, in bytes. | | qbittorrentupinfo_data | counter | Data uploaded since the server started, in bytes. | | qbittorrentalltimedl_total | counter | Total historical data downloaded, in bytes. | | qbittorrentalltimeul_total | counter | Total historical data uploaded, in bytes. | | qbittorrenttorrentscount | gauge | Number of torrents for each category and status. Example: qbittorrenttorrentscount{category="movies",status="downloading"}|

Screenshot

More info

License

This software is released under the GPLv3 license.

๐Ÿ”— More in this category

ยฉ 2026 GitRepoTrend ยท esanchezm/prometheus-qbittorrent-exporter ยท Updated daily from GitHub