add MetricsPort metrics, labels, values documentation to man page
As mentioned during the last relay operator meetup, please document the MetricsPort prometheus metrics their labels and values. In many cases pointer to other documentation is enough, for example in the case of tor relay flags you can point to the relevant tor specification section.
When new metrics/labels/values get introduced they should get a manpage entry with the same merge request (like requiring a changes file) to avoid this situation - metrics without documentation - from mounting up in the future again.
## HELP tor_relay_dos_total Denial of Service defenses related counters
## TYPE tor_relay_dos_total counter
tor_relay_dos_total
labels:
* type
* "circuit_rejected
* "circuit_killed_max_cell"
* "circuit_killed_max_cell_outq"
* "marked_address"
* "marked_address_maxq"
* "conn_rejected"
* "concurrent_conn_rejected"
* "single_hop_refused"
* "introduce2_rejected"
## HELP tor_relay_traffic_bytes Traffic related counters
## TYPE tor_relay_traffic_bytes counter
tor_relay_traffic_bytes
labels:
* direction
* "read"
* "written"
## HELP tor_relay_load_oom_bytes_total Total number of bytes the OOM has freed by subsystem
## TYPE tor_relay_load_oom_bytes_total counter
tor_relay_load_oom_bytes_total
labels:
* subsys
* "cell"
* "dns"
* "geoip"
* "hsdir"
## HELP tor_relay_load_socket_total Total number of sockets
## TYPE tor_relay_load_socket_total gauge
tor_relay_load_socket_total
labels:
* state
* "opened"
## HELP tor_relay_streams_total Total number of streams
## TYPE tor_relay_streams_total counter
tor_relay_streams_total
labels:
* type
* "BEGIN"
* "BEGIN_DIR"
* "RESOLVE"
## HELP tor_relay_circuits_total Total number of circuits
## TYPE tor_relay_circuits_total gauge
tor_relay_circuits_total
labels:
* state
* "opened"
## HELP tor_relay_load_onionskins_total Total number of onionskins handled
## TYPE tor_relay_load_onionskins_total counter
tor_relay_load_onionskins_total
labels:
* type
* "tap"
* "fast"
* "ntor"
* "ntor_v3"
* action
* "processed"
* "dropped"
## HELP tor_relay_load_global_rate_limit_reached_total Total number of global connection bucket limit reached
## TYPE tor_relay_load_global_rate_limit_reached_total counter
tor_relay_load_global_rate_limit_reached_total
labels:
* side
* "read"
* "write"
## HELP tor_relay_load_tcp_exhaustion_total Total number of times we ran out of TCP ports
## TYPE tor_relay_load_tcp_exhaustion_total counter
tor_relay_load_tcp_exhaustion_total
## HELP tor_relay_congestion_control_total Congestion control related counters
## TYPE tor_relay_congestion_control_total counter
tor_relay_congestion_control_total
labels:
* state
* "starvation"
* "clock_stalls"
* "flow_control"
* "cc_limits"
* "cc_circuits"
* action
* "rtt_reset"
* "rtt_skipped"
* "xoff_num_sent"
* "xon_num_sent"
* "above_delta"
* "above_ss_cwnd_max"
* "below_ss_inc_floor"
* "circs_created"
* "circs_exited_ss"
## HELP tor_relay_exit_dns_query_total Total number of DNS queries done by this relay
## TYPE tor_relay_exit_dns_query_total counter
tor_relay_exit_dns_query_total
## HELP tor_relay_flag Relay flags from consensus
## TYPE tor_relay_flag gauge
tor_relay_flag
labels:
* type
* "Fast"
* "Exit"
* "Authority"
* "Stable"
* "HSDir"
* "Running"
* "V2Dir"
* "Sybil"
* "Guard"
## HELP tor_relay_connections Total number of opened connections
## TYPE tor_relay_connections gauge
tor_relay_connections
labels:
* type
* "OR listener"
* "OR"
* "Exit"
* "Socks listener"
* "Socks"
* "Directory listener"
* "Directory"
* "Control listener"
* "Control"
* "Transparent pf/netfilter listener"
* "Transparent natd listener"
* "DNS listener"
* "Extended OR"
* "Extended OR listener"
* "HTTP tunnel listener"
* "Metrics listener"
* "Metrics"
* direction
* "initiated"
* "received"
* state
* "opened"
* family
* "ipv4"
* "ipv6"
## HELP tor_relay_congestion_control Congestion control related gauges
## TYPE tor_relay_congestion_control gauge
tor_relay_congestion_control
labels:
* state
* "slow_start_exit"
* "on_circ_close"
* "buffers"
* "cc_backoff"
* "cc_cwnd_update"
* "cc_estimates"
* action
* "cwnd"
* "bdp"
* "inc"
* "ss_cwnd"
* "xon_outbuf"
* "xoff_outbuf"
* "chan_blocked_pct"
* "gamma_drop"
* "delta_drop"
* "ss_chan_blocked_pct"
* "alpha_pct"
* "beta_pct"
* "delta_pct"
* "ss_queue"
* "queue"
* "bdp"
## HELP tor_relay_connections_total Total number of created/rejected connections
## TYPE tor_relay_connections_total counter
tor_relay_connections_total
same description as metric tor_relay_connections lables/values
## HELP tor_relay_exit_dns_error_total Total number of DNS errors encountered by this relay
## TYPE tor_relay_exit_dns_error_total counter
tor_relay_exit_dns_error_total
labels:
* reason
* "success"
* "format"
* "serverfailed"
* "notexist"
* "notimpl"
* "refused"
* "truncated"
* "unknown"
* "tor_timeout"
* "shutdown"
* "cancel"
* "nodata"
Edited by nat