From a8220ab2d293bb7f4b014b79d16b2fb05090fa93 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Feb 2021 12:45:55 +0100 Subject: Adding upstream version 1.29.0. Signed-off-by: Daniel Baumann --- collectors/python.d.plugin/tor/README.md | 24 +++++++++++++++++++----- collectors/python.d.plugin/tor/tor.chart.py | 3 ++- 2 files changed, 21 insertions(+), 6 deletions(-) (limited to 'collectors/python.d.plugin/tor') diff --git a/collectors/python.d.plugin/tor/README.md b/collectors/python.d.plugin/tor/README.md index 40905a958..192a86a37 100644 --- a/collectors/python.d.plugin/tor/README.md +++ b/collectors/python.d.plugin/tor/README.md @@ -1,8 +1,14 @@ -# tor + -Module connects to tor control port to collect traffic statistics. +# Tor monitoring with Netdata -**Requirements:** +Connects to the Tor control port to collect traffic statistics. + +## Requirements - `tor` program - `stem` python package @@ -14,9 +20,17 @@ It produces only one chart: - read - write -## configuration +## Configuration + +Edit the `python.d/tor.conf` configuration file using `edit-config` from the Netdata [config +directory](/docs/configure/nodes.md), which is typically at `/etc/netdata`. + +```bash +cd /etc/netdata # Replace this path with your Netdata config directory, if different +sudo ./edit-config python.d/tor.conf +``` -Needs only `control_port` +Needs only `control_port`. Here is an example for local server: diff --git a/collectors/python.d.plugin/tor/tor.chart.py b/collectors/python.d.plugin/tor/tor.chart.py index c6378ba5c..8dc021a63 100644 --- a/collectors/python.d.plugin/tor/tor.chart.py +++ b/collectors/python.d.plugin/tor/tor.chart.py @@ -11,11 +11,11 @@ try: import stem import stem.connection import stem.control + STEM_AVAILABLE = True except ImportError: STEM_AVAILABLE = False - DEF_PORT = 'default' ORDER = [ @@ -35,6 +35,7 @@ CHARTS = { class Service(SimpleService): """Provide netdata service for Tor""" + def __init__(self, configuration=None, name=None): super(Service, self).__init__(configuration=configuration, name=name) self.order = ORDER -- cgit v1.2.3