Transmission metrics otel exporter
  • Go 92.3%
  • Shell 6.6%
  • Dockerfile 1.1%
Find a file
chef c3a56fd25d
Some checks failed
Run Gosec / GoSec Security Scanner (push) Failing after 10s
Release / release (push) Successful in 58s
add missing file
2026-06-23 20:34:51 +02:00
.forgejo/workflows change runner 2026-06-22 22:47:34 +02:00
config hello 2026-06-22 22:42:40 +02:00
fetcher change runner 2026-06-22 22:47:34 +02:00
otel add missing file 2026-06-23 20:34:51 +02:00
packaging add packaging / license 2026-06-22 23:01:30 +02:00
util hello 2026-06-22 22:42:40 +02:00
.goreleaser.yml add packaging / license 2026-06-22 23:01:30 +02:00
Containerfile hello 2026-06-22 22:42:40 +02:00
go.mod change runner 2026-06-22 22:47:34 +02:00
go.sum hello 2026-06-22 22:42:40 +02:00
LICENSE add packaging / license 2026-06-22 23:01:30 +02:00
main.go change runner 2026-06-22 22:47:34 +02:00
README.md update readme 2026-06-22 23:09:51 +02:00

transmission-otel

Polls a Transmission RPC endpoint and exports torrent/session metrics via OpenTelemetry (OTLP/HTTP).

Usage

Docker 🐳

NOTICE: When running in docker make sure you can reach the Transmission RPC endpoint from the container.

CLI

docker run -d --name transmission-otel \
  -e TRANSMISSION_HOST=<host> \
  -e TRANSMISSION_PORT=<port> \
  -e TRANSMISSION_USER=<user> \
  -e TRANSMISSION_PASSWORD=<password> \
  -e TRANSMISSION_OTEL_ENDPOINT=<otel_endpoint> \
  git.aads.cloud/aad/bitcoind-metrics-exporter:latest

Compose

services:
  transmission-otel:
    image: git.aads.cloud/aad/bitcoind-metrics-exporter:latest
    environment:
      TRANSMISSION_HOST: <host>
      TRANSMISSION_PORT: <port>
      TRANSMISSION_USER: <user>
      TRANSMISSION_PASSWORD: <password>
      TRANSMISSION_OTEL_ENDPOINT: <otel_endpoint>

Install as systemd service

curl -fsSL https://git.aads.cloud/api/packages/aad/debian/repository.key | sudo gpg --dearmor -o /usr/share/keyrings/transmission-otel.gpg
echo "deb [signed-by=/usr/share/keyrings/transmission-otel.gpg] https://git.aads.cloud/api/packages/aad/debian stable main" | sudo tee /etc/apt/sources.list.d/transmission-otel.list
sudo apt update
sudo apt install transmission-otel
sudo $EDITOR /etc/transmission-otel/transmission-otel.env
sudo systemctl start transmission-otel

Configuration

All settings are read from TRANSMISSION_-prefixed environment variables.

Variable Default Description
TRANSMISSION_SCHEME http Scheme used to reach the Transmission RPC endpoint.
TRANSMISSION_HOST 127.0.0.1 Transmission RPC host.
TRANSMISSION_PORT 9091 Transmission RPC port.
TRANSMISSION_PATH /transmission/rpc Transmission RPC path.
TRANSMISSION_USER (empty) RPC basic auth username, if required.
TRANSMISSION_PASSWORD (empty) RPC basic auth password, if required.
TRANSMISSION_OTEL_ENDPOINT http://localhost:4318 OTLP/HTTP collector endpoint metrics are exported to. Ignored in debug mode.
TRANSMISSION_FETCH_INTERVAL 10 Seconds between polls of Transmission and metric exports.
TRANSMISSION_ERROR_CHECK_INTERVAL 60 Seconds between checks for torrents in an error state. This requires listing every torrent, so it's checked less often than other metrics to stay cheap on servers managing very large numbers of torrents. The reported value holds steady between checks.
TRANSMISSION_SPACE_CHECK_PATH (empty) Comma-separated list of filesystem paths to report free space for (e.g. /downloads,/media). Skipped entirely if unset.
TRANSMISSION_DEBUG false When true, skips the OTEL exporter entirely and just logs fetched metrics to stdout each cycle — useful for checking connectivity without a collector running.

Metrics

Metric Type Labels Description
torrent_count gauge Total number of torrents.
torrent_status_count gauge status (active, paused, error) Number of torrents in each state.
port_open gauge Whether the Transmission peer port is open (1) or closed (0).
download_speed_bytes gauge Current download speed, bytes/sec.
upload_speed_bytes gauge Current upload speed, bytes/sec.
free_space_bytes gauge path Free disk space at each path configured via TRANSMISSION_SPACE_CHECK_PATH.
total_download_bytes gauge Total download bytes.
total_upload_bytes gauge Total upload bytes.

No further registration is needed — every declared gauge is wired into the OTel meter automatically.