GithubHelp home page GithubHelp logo

esanchezm / prometheus-qbittorrent-exporter Goto Github PK

View Code? Open in Web Editor NEW
104.0 4.0 24.0 675 KB

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

License: GNU General Public License v3.0

Python 97.94% Dockerfile 2.06%
prometheus-exporter qbittorrent python3 qbittorrent-api

prometheus-qbittorrent-exporter's Introduction

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.