jarl
February 22, 2022, 5:33pm
1
I try to use the metrics port, because i need to know how many sockets tor uses.
In my torrc i added
MetricsPort relay_ip:9035 prometheus
MetricsPortPolicy accept prometheus_ip
The connection seems to work since i get the following when debug logs are enabled:
tor-relay Tor[1352]: connection_handle_listener_read(): Connection accepted on socket 18 (child of fd 6).
tor-relay Tor[1352]: connection_handle_listener_read(): New metrics connection opened from prometheus_ip.
tor-relay Tor[1352]: connection_add_impl(): new conn type Metrics, socket 18, address prometheus_ip, n_conns 9.
But neither prometheus nor wget get any data. It is just an empty response.
Any suggestions where to look next?
gus
February 22, 2022, 5:38pm
2
What’s your Tor version?
Before trying Prometheus, can you try to get manually the data?
Add in your torrc:
MetricsPort 127.0.0.1:9035
MetricsPortPolicy accept 127.0.0.1
And then:
wget http://127.0.0.1:9035/metrics -O /tmp/output.txt
jarl
February 22, 2022, 6:18pm
3
Tor Version: 0.4.6.9
Same behaviour:
--2022-02-22 17:58:33-- http://127.0.0.1:9035/metrics
Connecting to 127.0.0.1:9035... connected.
HTTP request sent, awaiting response... 200 OK
Length: 0 [text/plain]
Saving to: ‘/tmp/output.txt’
/tmp/output.txt [ <=> ] 0 --.-KB/s in 0s
2022-02-22 17:58:33 (0,00 B/s) - ‘/tmp/output.txt’ saved [0/0]
GeKo
February 22, 2022, 8:39pm
4
jarl via Tor Project Forum:
Tor Version: 0.4.6.9
Same behaviour:
--2022-02-22 17:58:33-- http://127.0.0.1:9035/metrics
Connecting to 127.0.0.1:9035... connected.
HTTP request sent, awaiting response... 200 OK
Length: 0 [text/plain]
Saving to: ‘/tmp/output.txt’
/tmp/output.txt [ <=> ] 0 --.-KB/s in 0s
2022-02-22 17:58:33 (0,00 B/s) - ‘/tmp/output.txt’ saved [0/0]
You need an Tor alpha version for that right now to work, alas.
1 Like
jarl
February 22, 2022, 9:03pm
5
Is it ok to run an alpha version on the network or will it get rejected by the authorities?
GeKo
February 23, 2022, 7:02am
6
jarl via Tor Project Forum:
Is it ok to run an alpha version on the network or will it get rejected by the authorities?
It’s perfectly legit.
1 Like
system
Closed
February 24, 2022, 12:48pm
7
This topic was automatically closed 2 hours after the last reply. New replies are no longer allowed.