No description
Find a file
2021-07-16 23:24:58 +00:00
.github/workflows Fixed output reference 2020-10-24 11:36:24 +02:00
grafana Fixed category variable 2020-10-26 18:23:09 +01:00
qbittorrent_exporter Setup logging before config loading 2021-07-16 23:24:58 +00:00
.gitignore Initial commit 2020-09-29 10:19:21 +02:00
Dockerfile Install from src and not pip package 2020-10-24 10:39:40 +02:00
LICENSE Initial commit 2020-09-29 10:19:21 +02:00
README.md Added info for prometheus.yml 2021-07-01 14:05:50 -04:00
setup.cfg First version 2020-09-29 11:12:22 +02:00
setup.py Version 1.1.2 2021-07-03 23:33:39 +02:00

Prometheus qBittorrent exporter

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

Metrics

These are the metrics this program exports, assuming the METRICS_PREFIX is qbittorrent:

Metric name Type Description
qbittorrent_up gauge Whether if the qBittorrent server is answering requests from this exporter. A version label with the server version is added
qbittorrent_connected gauge Whether if the qBittorrent server is connected to the Bittorrent network.
qbittorrent_firewalled gauge Whether if 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_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.