[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-relays] Re: Complete list of Tor Metrics keys



Hi forest,

Great idea!

Tor prints most of its relay counters even when they’re zero, so your curl/`sed` command captures most of what is needed.

The additional lines are the onion-service metrics and the signing-certificate expiry metric, which requires OfflineMasterKey 1 and a loaded signing certificate.

We’ve written up the source checks and included a downloadable Tor 0.4.9.15 dictionary covering all 37 metric families.
Testing shows add this dictionary produces 34–36% smaller Tor MetricsPort archives using zstd default level 3. Around 50% savings using same dictionary with zstd level 19, taking more compression (and decompression) time.

https://1aeo.com/blog/tor-metricsport-zstd-dictionary.html
https://1aeo.com/blog/data/tor-metrics-dict-0.4.9.15.txt


On Friday, September 11th, 2026 at 10:34 PM, forest via tor-relays <tor-relays@xxxxxxxxxxxxxxxxxxxx> wrote:

> Hello.
> 

> In order to analyze the ongoing DDoS attack, I'm collecting metrics data
> from my relays. It's a lot of data so I'm compressing it with zstd. I
> need a "dictionary" containing a typical metrics output in order to get
> a better compression ratio. The best I have comes from:
> 

>   curl -s 127.0.0.1:9035/metrics | sed 's/ [0-9]*$//' > dict
> 

> This creates a decent dictionary with sensitive information (the actual
> sample values themselves) removed. But from what I understand, Tor only
> outputs metrics that are relevant, so a relay that doesn't also host an
> onion service will never have a line starting in "tor_hs_", for example.
> 

> I'm looking for a sample containing all possible metrics strings, as if
> Tor did not remove entries that are unrelated to its current state. It
> doesn't seem like the source code contains anything like that in one
> easily-accessible location. Does anyone know where I can get this?
> 

> Regarding the privacy issue of storing metrics data, the relay will be
> automatically encrypting it with a public key so the relay itself never
> retains more than a few minutes worth of sensitive data in memory. The
> metrics will only be used to try to learn more about the ongoing DDoS.
> 

> Regards,
> forest

Attachment: image.png
Description: PNG image

Attachment: publickey - tor@1aeo.com - 0x9288289B.asc
Description: application/pgp-keys

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
tor-relays mailing list -- tor-relays@xxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to tor-relays-leave@xxxxxxxxxxxxxxxxxxxx