Skip to main content

Prometheus exporter for qbittorrent

Project description

Prometheus qBittorrent exporter

A prometheus exporter for qBitorrent. 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

  - 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
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_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

More info

License

This software is released under the GPLv3 license.

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

prometheus_qbittorrent_exporter-1.5.1.tar.gz (20.8 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file prometheus_qbittorrent_exporter-1.5.1.tar.gz.

File metadata

File hashes

Hashes for prometheus_qbittorrent_exporter-1.5.1.tar.gz
Algorithm Hash digest
SHA256 3faf451ff89ab1e2c0ec26a62912093c72cbe896100764148867ac1a35337f12
MD5 a3861157e1ae59e22b1607b5ac5cf192
BLAKE2b-256 898a6fb92567de0ce0f61eae0173d6a9771a91631a18cd0508a502c5b81d2ea4

See more details on using hashes here.

File details

Details for the file prometheus_qbittorrent_exporter-1.5.1-py3-none-any.whl.

File metadata

File hashes

Hashes for prometheus_qbittorrent_exporter-1.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9c5f2397a7bcb0af73676bafc7ceb8e1914612124c5103a5571ef4d6a92589ed
MD5 0c3e4946cb154c7ef2b9253d4c82bf6f
BLAKE2b-256 354c2f9561b34aa8cbebdc2ace4f479a8b283f288f06c07be8a1269feb8be1f8

See more details on using hashes here.

Supported by

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