Welcome to collectd_transmission’s documentation!¶
Contents:
Introduction¶
A python plugin for integrating collectd and transmission. With this installed, collectd will be querying transmission for the following:
Per session and cumulative:
- downloadedBytes
- uploadedBytes
- filesAdded
- secondsActive
General:
- activeTorrentCount
- blocklist_size
- downloadSpeed
- uploadSpeed
- pausedTorrentCount
- torrentCount
and creating the relevant RRD files (or pushing to graphite or whatever you have collectd doing)
Some of these metrics are per session, some session cumulative, some are session independent. Their type ‘current’, ‘cumulative’, ‘general’ is set in the name of the metric and the name of the metric is mostly self explanatory
How to install¶
Prerequisites¶
Those are collectd and transmission
I assume a Debian system here, amend accordingly for your system
If you have not already installed transmision, install it:
apt-get install transmission-daemon
The above install the daemon cause a headless box is assumed. It should probably work with a non headless box as well and a normal transmission installation but this has not been tested.
Install the python transmission binding
apt-get install python-transmissionrpc
Install collectd.
apt-get install collectd
Configure¶
Insert the following in your collectd.conf:
<Plugin python>
ModulePath "/path/to/module/dir" # Not needed if installed via pip or package
LogTraces false
Interactive false
Import "collectd_transmission"
<Module collectd_transmission>
username "myuser" # Required
password "mypass" # Required
address "http://localhost:9091/transmission/rpc" # Optional, defaults to "http://localhost:9091/transmission/rpc"
timeout "5" # Optional, defaults to 5
</Module>
</Plugin>
modified accordingly to your needs. Restart collectd and you are done.
sudo service collectd restart
There should be RRDs for transmission under collectd’s data directory. Most probably that is /var/lib/collectd/rrd/<hostname>/transmission/
Compatibility¶
Developed initially on a Debian Wheezy system.
That means:
- collectd 5.1
- transmissionrpc 0.8
Development now continues on a Debian Jessie system. Which means:
- collectd 5.4
- transmissionrpc 0.11
There is extra testing via automated means but there only so much it can do
Feel free to submit PRs for other systems support