relay: Add connection stats to MetricsPort
This adds the number of created and opened connections to the
MetricsPort for a relay for each connection type and direction.
Output looks like:
# HELP tor_relay_connections Connections metrics of this relay
# TYPE tor_relay_connections counter
tor_relay_connections{type="OR listener",direction="initiated",state="created"} 0
tor_relay_connections{type="OR listener",direction="received",state="created"} 0
tor_relay_connections{type="OR listener",direction="initiated",state="opened"} 0
tor_relay_connections{type="OR listener",direction="received",state="opened"} 0
tor_relay_connections{type="OR",direction="initiated",state="created"} 5
tor_relay_connections{type="OR",direction="received",state="created"} 0
tor_relay_connections{type="OR",direction="initiated",state="opened"} 5
tor_relay_connections{type="OR",direction="received",state="opened"} 0
tor_relay_connections{type="Exit",direction="initiated",state="created"} 0
tor_relay_connections{type="Exit",direction="received",state="created"} 0
tor_relay_connections{type="Exit",direction="initiated",state="opened"} 0
tor_relay_connections{type="Exit",direction="received",state="opened"} 0
tor_relay_connections{type="Socks listener",direction="initiated",state="created"} 0
tor_relay_connections{type="Socks listener",direction="received",state="created"} 0
tor_relay_connections{type="Socks listener",direction="initiated",state="opened"} 0
tor_relay_connections{type="Socks listener",direction="received",state="opened"} 0
tor_relay_connections{type="Socks",direction="initiated",state="created"} 0
tor_relay_connections{type="Socks",direction="received",state="created"} 0
tor_relay_connections{type="Socks",direction="initiated",state="opened"} 0
tor_relay_connections{type="Socks",direction="received",state="opened"} 0
tor_relay_connections{type="Directory listener",direction="initiated",state="created"} 0
tor_relay_connections{type="Directory listener",direction="received",state="created"} 0
tor_relay_connections{type="Directory listener",direction="initiated",state="opened"} 0
tor_relay_connections{type="Directory listener",direction="received",state="opened"} 0
tor_relay_connections{type="Directory",direction="initiated",state="created"} 0
tor_relay_connections{type="Directory",direction="received",state="created"} 0
tor_relay_connections{type="Directory",direction="initiated",state="opened"} 0
tor_relay_connections{type="Directory",direction="received",state="opened"} 0
tor_relay_connections{type="Control listener",direction="initiated",state="created"} 0
tor_relay_connections{type="Control listener",direction="received",state="created"} 0
tor_relay_connections{type="Control listener",direction="initiated",state="opened"} 0
tor_relay_connections{type="Control listener",direction="received",state="opened"} 0
tor_relay_connections{type="Control",direction="initiated",state="created"} 0
tor_relay_connections{type="Control",direction="received",state="created"} 0
tor_relay_connections{type="Control",direction="initiated",state="opened"} 0
tor_relay_connections{type="Control",direction="received",state="opened"} 0
tor_relay_connections{type="Transparent pf/netfilter listener",direction="initiated",state="created"} 0
tor_relay_connections{type="Transparent pf/netfilter listener",direction="received",state="created"} 0
tor_relay_connections{type="Transparent pf/netfilter listener",direction="initiated",state="opened"} 0
tor_relay_connections{type="Transparent pf/netfilter listener",direction="received",state="opened"} 0
tor_relay_connections{type="Transparent natd listener",direction="initiated",state="created"} 0
tor_relay_connections{type="Transparent natd listener",direction="received",state="created"} 0
tor_relay_connections{type="Transparent natd listener",direction="initiated",state="opened"} 0
tor_relay_connections{type="Transparent natd listener",direction="received",state="opened"} 0
tor_relay_connections{type="DNS listener",direction="initiated",state="created"} 0
tor_relay_connections{type="DNS listener",direction="received",state="created"} 0
tor_relay_connections{type="DNS listener",direction="initiated",state="opened"} 0
tor_relay_connections{type="DNS listener",direction="received",state="opened"} 0
tor_relay_connections{type="Extended OR",direction="initiated",state="created"} 0
tor_relay_connections{type="Extended OR",direction="received",state="created"} 0
tor_relay_connections{type="Extended OR",direction="initiated",state="opened"} 0
tor_relay_connections{type="Extended OR",direction="received",state="opened"} 0
tor_relay_connections{type="Extended OR listener",direction="initiated",state="created"} 0
tor_relay_connections{type="Extended OR listener",direction="received",state="created"} 0
tor_relay_connections{type="Extended OR listener",direction="initiated",state="opened"} 0
tor_relay_connections{type="Extended OR listener",direction="received",state="opened"} 0
tor_relay_connections{type="HTTP tunnel listener",direction="initiated",state="created"} 0
tor_relay_connections{type="HTTP tunnel listener",direction="received",state="created"} 0
tor_relay_connections{type="HTTP tunnel listener",direction="initiated",state="opened"} 0
tor_relay_connections{type="HTTP tunnel listener",direction="received",state="opened"} 0
tor_relay_connections{type="Metrics listener",direction="initiated",state="created"} 0
tor_relay_connections{type="Metrics listener",direction="received",state="created"} 1
tor_relay_connections{type="Metrics listener",direction="initiated",state="opened"} 0
tor_relay_connections{type="Metrics listener",direction="received",state="opened"} 1
tor_relay_connections{type="Metrics",direction="initiated",state="created"} 0
tor_relay_connections{type="Metrics",direction="received",state="created"} 0
tor_relay_connections{type="Metrics",direction="initiated",state="opened"} 0
tor_relay_connections{type="Metrics",direction="received",state="opened"} 0
Related to #40194
Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-10-11 20:03:38 +02:00
|
|
|
o Minor feature (relay, metrics):
|
|
|
|
- Add counters to the MetricsPort how many connections, per type, are
|
|
|
|
currently opened and how many were created. Part of ticket 40194.
|
2022-10-27 16:35:10 +02:00
|
|
|
- Add total number of streams seen by an Exit to the MetricsPort.
|
|
|
|
- Add congestion control RTT reset counter to MetricsPort.
|
|
|
|
- Add DoS defenses counter to MetricsPort.
|
|
|
|
- Add relay flags from the consensus to the MetricsPort.
|
|
|
|
- Add total number of opened circuits to MetricsPort.
|
|
|
|
- Add traffic stats as in number of read/written bytes in total.
|