Révision 17f78427
Whitespace cleanup
- remove trailing whitespace
- remove empty lines at the end of files
| plugins/tor/tor_ | ||
|---|---|---|
| 2 | 2 |
# -*- coding: utf-8 -*- |
| 3 | 3 |
''' |
| 4 | 4 |
=head1 NAME |
| 5 |
tor_
|
|
| 5 |
tor_ |
|
| 6 | 6 |
|
| 7 | 7 |
=head1 DESCRIPTION |
| 8 | 8 |
Wildcard plugin that gathers some metrics from the Tor deamon |
| ... | ... | |
| 149 | 149 |
print('no (failed to import the required python module "stem": {})'.format(e))
|
| 150 | 150 |
|
| 151 | 151 |
try: |
| 152 |
import GeoIP
|
|
| 152 |
import GeoIP |
|
| 153 | 153 |
|
| 154 | 154 |
except ImportError as e: |
| 155 | 155 |
print('no (failed to import the required python module "GeoIP": {})'.format(e))
|
| ... | ... | |
| 426 | 426 |
'category': 'network', |
| 427 | 427 |
'info': 'known Tor onion routers'} |
| 428 | 428 |
labels = {'routers': {'label': 'routers', 'min': 0, 'type': 'GAUGE'} }
|
| 429 |
|
|
| 429 |
|
|
| 430 | 430 |
|
| 431 | 431 |
TorPlugin.conf_from_dict(graph, labels) |
| 432 | 432 |
|
| ... | ... | |
| 448 | 448 |
onr = 0 |
| 449 | 449 |
for router in routers: |
| 450 | 450 |
if router[0] == "r": |
| 451 |
onr += 1
|
|
| 452 |
|
|
| 451 |
onr += 1 |
|
| 452 |
|
|
| 453 | 453 |
print('routers.value {}'.format(onr))
|
| 454 | 454 |
|
| 455 | 455 |
|
| ... | ... | |
| 491 | 491 |
|
| 492 | 492 |
|
| 493 | 493 |
########################## |
| 494 |
# Main
|
|
| 494 |
# Main |
|
| 495 | 495 |
########################## |
| 496 | 496 |
|
| 497 | 497 |
|
Formats disponibles : Unified diff