From 0dd06a6b730e9e505c624c195cd277abb69263c6 Mon Sep 17 00:00:00 2001 From: Neraud Date: Fri, 21 Jul 2017 10:28:19 +0200 Subject: [PATCH] Improve doc - Migrate style to perldoc - Improve requirements - Add interpretation - Add licence --- plugins/torrent/deluge_ | 139 ++++++++++++++++++++++++++++------------ 1 file changed, 97 insertions(+), 42 deletions(-) diff --git a/plugins/torrent/deluge_ b/plugins/torrent/deluge_ index 654dba95..2009bba2 100644 --- a/plugins/torrent/deluge_ +++ b/plugins/torrent/deluge_ @@ -1,46 +1,101 @@ #! /usr/bin/env python2 -# -# Munin Wildcard Plugin for Deluge torrent client -# -# This plugin has 3 modes : -# - connections : monitors the number of connections -# - bandwidth : monitors the bandwidth (up, up overhead, down, down overhead) -# - states : monitors the torrents' states -# -# To use one of these modes, link the this plugin with a name like 'deluge_' -# For example : -# ln -s /path/to/deluge_ /etc/munin/plugins/deluge_connections -# -# Use your "/etc/munin/plugin-conf.d/munin-node" to configure this plugin. -# You must at least add : -# [deluge_*] -# user -# env.HOME -# -# By default, this plugin will try to access the deluge daemon with the following configuration : -# host 127.0.0.1 -# port 58846 -# no username -# no password -# -# You can change these settings in "plugin-conf.d/munin-node" : -# [deluge_*] -# user -# env.HOME -# env.host 127.0.0.1 -# env.port 58846 -# env.username user -# env.password pass -# -# By default, deluge configuration files will be searched under $XDG_CONFIG_HOME, which is by default set to $HOME/.config -# Setting env.HOME allows this default to work. However, you can also explicitly set the env.XDG_CONFIG_HOME if needed. -# -# Written by : Neraud -# -# Markers for munin : -# %# family=auto -# %# capabilities=autoconf suggest -########################################## + +"""=cut +=head1 NAME + +deluge_ - Munin wildcard plugin to monitor Deluge torrent client + +=head1 REQUIREMENTS + + - Python2.5+ (Deluge itself won't work with python3) + - Deluge + +This plugin also uses + - deluge.ui.client + - deluge.log + - twisted +These modules are required by Deluge itself. + +=head1 INSTALLATION + +This plugin has 3 modes : + - connections : monitors the number of connections + - bandwidth : monitors the bandwidth (up, up overhead, down, down overhead) + - states : monitors the torrents' states + +To use one of these modes, link the this plugin as 'deluge_' +For example : +ln -s /path/to/deluge_ /etc/munin/plugins/deluge_connections + +=head1 CONFIGURATION + +Use your "/etc/munin/plugin-conf.d/munin-node" to configure this plugin. +You must at least add : + [deluge_*] + user + env.HOME + +By default, this plugin will try to access the deluge daemon with the following +settings : + host 127.0.0.1 + port 58846 + no username + no password + +You can change these settings in "plugin-conf.d/munin-node" : + [deluge_*] + user + env.HOME + env.host 127.0.0.1 + env.port 58846 + env.username user + env.password pass + +By default, deluge configuration files will be searched under $XDG_CONFIG_HOME, +which is by default set to $HOME/.config +Setting env.HOME allows this default to work. However, you can also explicitly +set the env.XDG_CONFIG_HOME if needed. + +=head1 INTERPRETATION + +=head2 connections + +In the "connections" mode, this plugin shows a graph with the number of +connections + +=head2 bandwidth + +In the "bandwidth" mode, this plugin show graphs for the download and upload +bandwidth. +Each of them has "payload" and "overhead" value. + - with positive values : the download values + (payloadDownloadRate & overheadDownloadRate) + - with negative values : the upload values + (payloadUploadRate & overheadUploadRate) + +=head2 states + +In the "states" mode, this plugin shows the number of torrents in each state : +Downloading, Seeding, Paused, Error, Queued, Checking, Other + +=head1 MAGIC MARKERS + + #%# family=auto + #%# capabilities=autoconf suggest + +=head1 VERSION + +1.0.0 + +=head1 AUTHOR + +Neraud (https://github.com/Neraud) + +=head1 LICENSE + +GPLv2 + +=cut""" import logging