2
0
mirror of https://github.com/munin-monitoring/contrib.git synced 2018-11-08 00:59:34 +01:00

Improve doc

- Migrate style to perldoc
- Improve requirements
- Add interpretation
- Add licence
This commit is contained in:
Neraud 2017-07-21 10:28:19 +02:00
parent 2370d4e742
commit 0dd06a6b73

View File

@ -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_<mode>'
# 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 <user_with_access_to_deluge>
# env.HOME <path_to_deluge_user_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 <user_with_access_to_deluge>
# env.HOME <path_to_deluge_user_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_<mode>'
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 <user_with_access_to_deluge>
env.HOME <path_to_deluge_user_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 <user_with_access_to_deluge>
env.HOME <path_to_deluge_user_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