architek / tormon

Monitor Tor relay with Grafana

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TorMon

Monitor Tor relay with Grafana

Requirements

  • A running InfluxDB and Grafana
  • Tor control configured with password access

Install

Configure .env.container by setting your Tor controler and InfluxDB settings.

TAG_HOST is the tag hostname of the running container, it can be anything. This will be the selector in Grafana so that you can monitor several Tor instances.

Configure .env.torid with:

TORCONTROL_PASSWORD=password_to_torcontrol
TOR_FP=0123456789ABCDEF0123456789ABCDEF01234567

To start TorMon, you can use docker-compose

docker-compose up -d

If you don't want to use docker, make sure you have python3 and pip installed and then:

cd src/
python3 -m pip install -r requirements.txt
./tormon.py  # run that in tmux or equivalent

The Influxdb database will be created if it does not exists.

At that point, in Grafana, create a datasource of type InfluxDB to point to the new InfluxDB database.

Import dashboard using JSON file located in dashboard/

Select the datasource you just created

Remarks

Make sure to not expose your Tor control endpoint!

TorMon does not use tor controler async features, it relies on several threads polling the controler.

You can follow TorMon output with

docker-compose logs -f

Screenshot

2022-04-03-181417_1920x1080_scrot

About

Monitor Tor relay with Grafana

License:GNU General Public License v3.0


Languages

Language:Python 96.5%Language:Dockerfile 3.5%