tobbez/deluge_exporter

By tobbez

Updated 4 days ago

Prometheus exporter for the Deluge BitTorrent client

Image
2

1M+

tobbez/deluge_exporter repository overview

Deluge Exporter

Prometheus exporter for the Deluge BitTorrent client.

Requirements

The exporter only supports Deluge 2. For Deluge 1.3.x, see the v1.0 tag.

Notes

State

The project is generally considered complete. However, there are a number of areas that could be improved, and contributions are welcome. Some areas that could use improvements are:

  • Packaging: There are currently no packaging scripts nor PyPI packages

Configuration

General settings
  • PER_TORRENT_METRICS: Per-torrent metrics are disabled by default. Set this environment variable to 1 to enable. Note that this may significantly increase the number of time series (depending on the number of torrents in your Deluge instances).
  • LISTEN_PORT: The port the exporter should listen on. The default is 9354.
  • LISTEN_ADDRESS: The address the exporter should listen on. The default is to listen on all addresses.
Deluge connection

There are two options for configuring the Deluge connection details: to specify them explicitly, or to let the exporter read them from the Deluge configuration files.

Explicit configuration

Set the all of the following environment variables:

  • DELUGE_HOST: The host where Deluge is running.
  • DELUGE_PORT: The port on which Deluge is listening.
  • DELUGE_USER: The username to use when authenticating.
  • DELUGE_PASSWORD: The password to use when authenticating.
Read from Deluge's configuration files

If not all of the environment variables listed in the previous section are not set, the exporter will automatically attempt to read the connection details from Deluge's configuration files (for the current user).

The following environment variables can be used to customize the behaviour:

  • DELUGE_CONFIG_DIR: The directory to read the configuration files from. The default is ~/.config/deluge on Linux and %APPDATA%\deluge on Windows.
  • DELUGE_HOST: Override the the host to connect to.

Docker

A docker image is available on Docker Hub.

Passing configuration using environment variables:

docker run -e "DELUGE_HOST=172.17.0.1" -e "DELUGE_PORT=58846" -e "DELUGE_USER=user" -e "DELUGE_PASSWORD=password" -v /etc/deluge:/root/.config/deluge/ -p 9354:9354 tobbez/deluge_exporter:latest

Or passing the deluge config directory into the container, for example:

docker run -e "DELUGE_HOST=172.17.0.1" -v /etc/deluge:/root/.config/deluge/ -p 9354:9354 tobbez/deluge_exporter:latest

Windows service

On Windows, a service can be created by running the following with Administrator privileges:

sc create deluge_exporter binPath= "C:\path\to\python.exe C:\path\to\deluge_exporter_windows_service.py start" obj= .\USERNAME password= PASSWORD displayname= deluge_exporter start= auto

Exported metrics

For a full list of metrics, please refer to the README on GitHub

Tag summary

Content type

Image

Digest

sha256:c6b7982a2

Size

20.9 MB

Last updated

4 days ago

docker pull tobbez/deluge_exporter