Monitor Multiple Tor Relays

Problem/Question

I want to monitor multiple Tor Relays running on one server.

Relevant docs you followed/actions you took to solve the issue

Followed the config guide.

Environment/Browser/Agent’s version etc

Debian 12.6, netdata v1.46.3

What I expected to happen

The possibility to configure several Tor Relays.

I duplicated the local_socket config and changed the name and the path to the control socket. But Netdata is only monitoring the last Relay. The first one is ignored, despite a different name.

Hi, @Nolz. Can you configure a separate ControlPort for each instance?

Hi, I configured two separate sockets as control ports like this:

local_socket:
  name: 'default'
  control_port: '/run/tor/control'

local_socket:
  name: 'relaytor'
  control_port: '/run/tor-instances/relaytor/control'

Both are working when separately configured. But if I configure both at the same time, only the second one will be monitored.

I have the suspicion that only one job at a time is supported?

Because you gave them the same name local_socket.

Ahhh this name needs to be distinctive. I thought the name: name.
Thanks you, it’s working now :slight_smile:

Python version (the one you are using) will be removed in the next stable release (v1.47.0). I rewrote it in golang.

You have 2 options:

  • Keep using the python version (the existing installation will still have it): you will need to enable it python.d.conf (it is disabled now).
  • Configure go.d/tor (will be in v1.47.0). I tested it via TCP socket (e.g. ControlPort 9051) + password (not Cookie file auth). It should work via Unix socket too, but I didn’t test it.

Thanks, I’ll switch to the Go plugin when available