diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-06-14 19:20:36 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-06-14 19:20:36 +0000 |
commit | dd24e74edfbafc09eaeb2dde0fda7eb3e1e86d0b (patch) | |
tree | 1e52f4dac2622ab377c7649f218fb49003b4cbb9 /collectors/python.d.plugin/tor/tor.chart.py | |
parent | Releasing debian version 1.39.1-2. (diff) | |
download | netdata-dd24e74edfbafc09eaeb2dde0fda7eb3e1e86d0b.tar.xz netdata-dd24e74edfbafc09eaeb2dde0fda7eb3e1e86d0b.zip |
Merging upstream version 1.40.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'collectors/python.d.plugin/tor/tor.chart.py')
-rw-r--r-- | collectors/python.d.plugin/tor/tor.chart.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/collectors/python.d.plugin/tor/tor.chart.py b/collectors/python.d.plugin/tor/tor.chart.py index 8dc021a63..f7bc2d79b 100644 --- a/collectors/python.d.plugin/tor/tor.chart.py +++ b/collectors/python.d.plugin/tor/tor.chart.py @@ -17,6 +17,7 @@ except ImportError: STEM_AVAILABLE = False DEF_PORT = 'default' +DEF_ADDR = '127.0.0.1' ORDER = [ 'traffic', @@ -41,6 +42,7 @@ class Service(SimpleService): self.order = ORDER self.definitions = CHARTS self.port = self.configuration.get('control_port', DEF_PORT) + self.addr = self.configuration.get('control_addr', DEF_ADDR) self.password = self.configuration.get('password') self.use_socket = isinstance(self.port, str) and self.port != DEF_PORT and not self.port.isdigit() self.conn = None @@ -78,7 +80,7 @@ class Service(SimpleService): def connect_via_port(self): try: - self.conn = stem.control.Controller.from_port(port=self.port) + self.conn = stem.control.Controller.from_port(address=self.addr, port=self.port) except (stem.SocketError, ValueError) as error: self.error(error) |