Projet

Général

Profil

Révision f9d8ce70

IDf9d8ce70ed038f82f323fce08bf773a079c50e66
Parent 94888223
Enfant 743395a6

Ajouté par Lars Kruse il y a environ 5 ans

Plugin tor_: fix perlpod formatting

Voir les différences:

plugins/tor/tor_
1 1
#!/usr/bin/python3
2 2
'''
3 3
=head1 NAME
4

  
4 5
tor_
5 6

  
6 7
=head1 DESCRIPTION
8

  
7 9
Wildcard plugin that gathers some metrics from the Tor daemon
8
https://github.com/daftaupe/munin-tor
10
(https://github.com/daftaupe/munin-tor).
9 11

  
10 12
Derived from https://github.com/mweinelt/munin-tor
11 13

  
12
This plugin requires the stem library : https://stem.torproject.org/
13
This plugin requires the GeoIP library : https://www.maxmind.com for the countries plugin
14
This plugin requires the stem library (https://stem.torproject.org/).
15

  
16
This plugin requires the GeoIP library (https://www.maxmind.com) for the countries plugin.
17

  
18
Available plugins:
19

  
20
=over 4
21

  
22
=item tor_bandwidth   - graph the glabal bandwidth
23

  
24
=item tor_connections - graph the number of connexions
25

  
26
=item tor_countries   - graph the countries represented our connexions
27

  
28
=item tor_dormant     - graph if tor is dormant or not
29

  
30
=item tor_flags       - graph the different flags of the relay
31

  
32
=item tor_routers     - graph the number of routers seen by the relay
14 33

  
15
Available plugins :
16
tor_bandwidth    # Graph the glabal bandwidth
17
tor_connections  # Graph the number of connexions
18
tor_countries    # Graph the countries represented our connexions
19
tor_dormant      # Graph if tor is dormant or not
20
tor_flags        # Graph the different flags of the relay
21
tor_routers      # Graph the number of routers seen by the relay
22
tor_traffic      # Graph the read/written traffic
34
=item tor_traffic     - graph the read/written traffic
35

  
36
=back
23 37

  
24 38
=head2 CONFIGURATION
25
The default configuration is below
26
[tor_*]
27
user toranon # or any other user/group that is running tor
28
group toranon
29
env.torcachefile munin_tor_country_stats.json
30
env.torconnectmethod port
31
env.torgeoippath /usr/share/GeoIP/GeoIP.dat
32
env.tormaxcountries 15
33
env.torport 9051
34
env.torsocket /var/run/tor/control
35

  
36
To make it connect through a socket modify this way
37
[tor_*]
38
user toranon # or any other user/group that is running tor
39
group toranon
40
env.torcachefile munin_tor_country_stats.json
41
env.torconnectmethod socket
42
env.torgeoippath /usr/share/GeoIP/GeoIP.dat
43
env.tormaxcountries 15
44
env.torport 9051
45
env.torsocket /var/run/tor/control
39

  
40
The default configuration is:
41

  
42
 [tor_*]
43
 user toranon # or any other user/group that is running tor
44
 group toranon
45
 env.torcachefile munin_tor_country_stats.json
46
 env.torconnectmethod port
47
 env.torgeoippath /usr/share/GeoIP/GeoIP.dat
48
 env.tormaxcountries 15
49
 env.torport 9051
50
 env.torsocket /var/run/tor/control
51

  
52
To make it connect through a socket, you simply need to change C<torconnectmethod>:
53

  
54
 env.torconnectmethod socket
46 55

  
47 56
=head1 COPYRIGHT
57

  
48 58
MIT License
49 59

  
60
SPDX-License-Identifier: MIT
61

  
50 62
=head1 AUTHOR
63

  
51 64
Pierre-Alain TORET <pierre-alain.toret@protonmail.com>
52 65

  
53 66
=head1 MAGIC MARKERS
54
  #%# family=auto
55
  #%# capabilities=autoconf suggest
67

  
68
 #%# family=auto
69
 #%# capabilities=autoconf suggest
70

  
71
=cut
56 72
'''
57 73

  
58 74
import collections

Formats disponibles : Unified diff