Plugin tor_: fix perlpod formatting

This commit is contained in:
Lars Kruse 2020-10-05 21:54:36 +02:00
parent 94888223ff
commit f9d8ce70ed
1 changed files with 49 additions and 33 deletions

View File

@ -1,58 +1,74 @@
#!/usr/bin/python3
'''
=head1 NAME
tor_
=head1 DESCRIPTION
Wildcard plugin that gathers some metrics from the Tor daemon
https://github.com/daftaupe/munin-tor
(https://github.com/daftaupe/munin-tor).
Derived from https://github.com/mweinelt/munin-tor
This plugin requires the stem library : https://stem.torproject.org/
This plugin requires the GeoIP library : https://www.maxmind.com for the countries plugin
This plugin requires the stem library (https://stem.torproject.org/).
Available plugins :
tor_bandwidth # Graph the glabal bandwidth
tor_connections # Graph the number of connexions
tor_countries # Graph the countries represented our connexions
tor_dormant # Graph if tor is dormant or not
tor_flags # Graph the different flags of the relay
tor_routers # Graph the number of routers seen by the relay
tor_traffic # Graph the read/written traffic
This plugin requires the GeoIP library (https://www.maxmind.com) for the countries plugin.
Available plugins:
=over 4
=item tor_bandwidth - graph the glabal bandwidth
=item tor_connections - graph the number of connexions
=item tor_countries - graph the countries represented our connexions
=item tor_dormant - graph if tor is dormant or not
=item tor_flags - graph the different flags of the relay
=item tor_routers - graph the number of routers seen by the relay
=item tor_traffic - graph the read/written traffic
=back
=head2 CONFIGURATION
The default configuration is below
[tor_*]
user toranon # or any other user/group that is running tor
group toranon
env.torcachefile munin_tor_country_stats.json
env.torconnectmethod port
env.torgeoippath /usr/share/GeoIP/GeoIP.dat
env.tormaxcountries 15
env.torport 9051
env.torsocket /var/run/tor/control
To make it connect through a socket modify this way
[tor_*]
user toranon # or any other user/group that is running tor
group toranon
env.torcachefile munin_tor_country_stats.json
env.torconnectmethod socket
env.torgeoippath /usr/share/GeoIP/GeoIP.dat
env.tormaxcountries 15
env.torport 9051
env.torsocket /var/run/tor/control
The default configuration is:
[tor_*]
user toranon # or any other user/group that is running tor
group toranon
env.torcachefile munin_tor_country_stats.json
env.torconnectmethod port
env.torgeoippath /usr/share/GeoIP/GeoIP.dat
env.tormaxcountries 15
env.torport 9051
env.torsocket /var/run/tor/control
To make it connect through a socket, you simply need to change C<torconnectmethod>:
env.torconnectmethod socket
=head1 COPYRIGHT
MIT License
SPDX-License-Identifier: MIT
=head1 AUTHOR
Pierre-Alain TORET <pierre-alain.toret@protonmail.com>
=head1 MAGIC MARKERS
#%# family=auto
#%# capabilities=autoconf suggest
#%# family=auto
#%# capabilities=autoconf suggest
=cut
'''
import collections