Prometheus exporter for the Deluge BitTorrent client.
- Python 2.7 or 3
- prometheus_client
- deluge-client
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
There is currently no explicit configuration. The Deluge Exporter currently expects to be run under the same user account as the deluge daemon, and extracts the connection details from Deluge's configuration files.
The exporter listens on port 9354.
Per-torrent metrics are not included by design. They are not particularly useful, and would cause series bloat.
A contribution adding them would be accepted assuming it would be opt-in (by command line flag or configuration option).
Once Deluge 2 is released, the libtorrent metrics need to be updated to expose the newer performance/statistics counters.
Deluge 1.3.x only exposes the statistics provided by the deprecated
session_get_status()
.
A docker image is available on Docker Hub.
It currently requires 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
Name | Type | Description |
---|---|---|
deluge_libtorrent_has_incoming_connections | gauge | 0 as long as no incoming connections have been established on the listening socket. Every time you change the listen port, this will be reset to 0. |
deluge_libtorrent_redundant_download_bytes_total | counter | The number of bytes that has been received more than once. |
deluge_libtorrent_failed_bytes_total | counter | The number of bytes that were downloaded and later failed the hash check. |
deluge_libtorrent_peers | gauge | Current number of peer connections in the current session, including connections that are not yet fully open. |
deluge_libtorrent_unchoked_peers | gauge | The current number of unchoked peers. |
deluge_libtorrent_allowed_upload_slots | gauge | The current allowed number of unchoked peers. |
deluge_libtorrent_upload_queued_peers | gauge | The number of peers that are waiting for more bandwidth quota from the torrent rate limiter. |
deluge_libtorrent_download_queued_peers | gauge | The number of peers that are waiting for more bandwidth quota from the torrent rate limiter. |
deluge_libtorrent_upload_queued_bytes | gauge | The number of bytes the queued connections are waiting for to be able to send. |
deluge_libtorrent_download_queued_bytes | gauge | The number of bytes the queued connections are waiting for to be able to receive. |
deluge_libtorrent_dht_nodes | gauge | The number of nodes in the DHT routing table. |
deluge_libtorrent_dht_cached_nodes | gauge | The number of cached DHT nodes (used to replace the regular nodes in the routing table in case any of them becomes unresponsive). |
deluge_libtorrent_dht_torrents | gauge | The number of torrents tracked by the DHT at the moment. |
deluge_libtorrent_dht_estimated_global_nodes | gauge | An estimation of the total number of nodes in the DHT network. |
deluge_libtorrent_dht_total_allocations | gauge | The number of nodes allocated dynamically for a particular DHT lookup. This represents roughly the amount of memory used by the DHT. |
deluge_libtorrent_upload_bytes_total | counter | Total bytes uploaded for all torrents. (labels: {type=dht|ip_overhead|payload|tracker}) |
deluge_libtorrent_download_bytes_total | counter | Total bytes downloaded for all torrents. (labels: {type=dht|ip_overhead|payload|tracker}) |
deluge_info | gauge | Deluge information (labels: {libtorrent_version=, version=}) |
deluge_config_info_sent | gauge | Value of the deluge config setting info_sent |
deluge_config_lsd | gauge | Value of the deluge config setting lsd |
deluge_config_send_info | gauge | Value of the deluge config setting send_info |
deluge_config_enc_in_policy | gauge | Value of the deluge config setting enc_in_policy |
deluge_config_queue_new_to_top | gauge | Value of the deluge config setting queue_new_to_top |
deluge_config_ignore_limits_on_local_network | gauge | Value of the deluge config setting ignore_limits_on_local_network |
deluge_config_rate_limit_ip_overhead | gauge | Value of the deluge config setting rate_limit_ip_overhead |
deluge_config_daemon_port | gauge | Value of the deluge config setting daemon_port |
deluge_config_natpmp | gauge | Value of the deluge config setting natpmp |
deluge_config_max_active_limit | gauge | Value of the deluge config setting max_active_limit |
deluge_config_utpex | gauge | Value of the deluge config setting utpex |
deluge_config_max_active_downloading | gauge | Value of the deluge config setting max_active_downloading |
deluge_config_max_active_seeding | gauge | Value of the deluge config setting max_active_seeding |
deluge_config_allow_remote | gauge | Value of the deluge config setting allow_remote |
deluge_config_max_half_open_connections | gauge | Value of the deluge config setting max_half_open_connections |
deluge_config_compact_allocation | gauge | Value of the deluge config setting compact_allocation |
deluge_config_max_upload_speed | gauge | Value of the deluge config setting max_upload_speed |
deluge_config_cache_expiry | gauge | Value of the deluge config setting cache_expiry |
deluge_config_prioritize_first_last_pieces | gauge | Value of the deluge config setting prioritize_first_last_pieces |
deluge_config_auto_managed | gauge | Value of the deluge config setting auto_managed |
deluge_config_enc_level | gauge | Value of the deluge config setting enc_level |
deluge_config_max_connections_per_second | gauge | Value of the deluge config setting max_connections_per_second |
deluge_config_dont_count_slow_torrents | gauge | Value of the deluge config setting dont_count_slow_torrents |
deluge_config_random_outgoing_ports | gauge | Value of the deluge config setting random_outgoing_ports |
deluge_config_max_upload_slots_per_torrent | gauge | Value of the deluge config setting max_upload_slots_per_torrent |
deluge_config_new_release_check | gauge | Value of the deluge config setting new_release_check |
deluge_config_enc_out_policy | gauge | Value of the deluge config setting enc_out_policy |
deluge_config_seed_time_limit | gauge | Value of the deluge config setting seed_time_limit |
deluge_config_cache_size | gauge | Value of the deluge config setting cache_size |
deluge_config_share_ratio_limit | gauge | Value of the deluge config setting share_ratio_limit |
deluge_config_max_download_speed | gauge | Value of the deluge config setting max_download_speed |
deluge_config_stop_seed_at_ratio | gauge | Value of the deluge config setting stop_seed_at_ratio |
deluge_config_upnp | gauge | Value of the deluge config setting upnp |
deluge_config_max_download_speed_per_torrent | gauge | Value of the deluge config setting max_download_speed_per_torrent |
deluge_config_max_upload_slots_global | gauge | Value of the deluge config setting max_upload_slots_global |
deluge_config_random_port | gauge | Value of the deluge config setting random_port |
deluge_config_autoadd_enable | gauge | Value of the deluge config setting autoadd_enable |
deluge_config_max_connections_global | gauge | Value of the deluge config setting max_connections_global |
deluge_config_enc_prefer_rc4 | gauge | Value of the deluge config setting enc_prefer_rc4 |
deluge_config_dht | gauge | Value of the deluge config setting dht |
deluge_config_stop_seed_ratio | gauge | Value of the deluge config setting stop_seed_ratio |
deluge_config_seed_time_ratio_limit | gauge | Value of the deluge config setting seed_time_ratio_limit |
deluge_config_max_upload_speed_per_torrent | gauge | Value of the deluge config setting max_upload_speed_per_torrent |
deluge_config_copy_torrent_file | gauge | Value of the deluge config setting copy_torrent_file |
deluge_config_del_copy_torrent_file | gauge | Value of the deluge config setting del_copy_torrent_file |
deluge_config_move_completed | gauge | Value of the deluge config setting move_completed |
deluge_config_add_paused | gauge | Value of the deluge config setting add_paused |
deluge_config_max_connections_per_torrent | gauge | Value of the deluge config setting max_connections_per_torrent |
deluge_config_remove_seed_at_ratio | gauge | Value of the deluge config setting remove_seed_at_ratio |
deluge_torrents_by_label | gauge | The number of torrents for each label assigned to a torrent using the deluge label plugin (labels: {label=}) |
deluge_torrents | gauge | The number of torrents in a specific state (note: some states overlap) (labels: {state=active|checking|downloading|error|paused|queued|seeding|total}) |