Complete list of Tor Metrics keys
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 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 -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQQtr8ZXhq/o01Qf/pow+TRLM+X4xgUCaqTkCQAKCRAw+TRLM+X4 xokFAP4snthWGiMg8KXz318kibVVyBZhUIBlOUhVAaC4SuG2NwD/ZQThLAMQFUxP mAm6PbE68Hk91vvxQq9cr6ySYwjlCwc= =ck/7 -----END PGP SIGNATURE-----
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@lists.torproject.org> 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
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 2026-11-05 05:20, Tor at 1AEO via tor-relays wrote:
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.
I get about 50% extra savings even with compression level 8 (5.53% ratio with the dictionary vs 10.22% without). It's very useful for my specific case, since I'm using public key encryption on each Prometheus file before saving it to disk so that, if my relay is ever compromised, there will not be any sensitive metrics data lying around in plaintext. But because it has to encrypt it right away, the compressor's dictionary has to reinitialize for each file. Having this external dictionary helps.
https://1aeo.com/blog/tor-metricsport-zstd-dictionary.html https://1aeo.com/blog/data/tor-metrics-dict-0.4.9.15.txt
Thank you very much! This performs significantly better than the auto- generated dictionary that zstd is able to create with training. Btw, how much of your testing is directed entirely by your LLM agent and how much are you involved with testing, methodology, writing, etc? Regards, forest -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQQtr8ZXhq/o01Qf/pow+TRLM+X4xgUCauwedQAKCRAw+TRLM+X4 xuP0AP4pqxUrqlZWmOfL2trjBO0O1Y52tY9yXiLUXCi7M5g46wD/XS+peFGBa5i/ 8YApx6S4um4i7ycgRGORhpIF2563PgE= =SRRl -----END PGP SIGNATURE-----
Btw, how much of your testing is directed entirely by your LLM agent and how much are you involved with testing, methodology, writing, etc?
Nothing is autonomous, but hopefully within the next 6-12 months! Better plans have better outcomes. Everything requires guidance and cross validation. Ex: Having LLM agents check each other and critique each other is very useful. On Wednesday, November 4th, 2026 at 10:21 PM, forest via tor-relays <tor-relays@lists.torproject.org> wrote:
On 2026-11-05 05:20, Tor at 1AEO via tor-relays wrote:
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.
I get about 50% extra savings even with compression level 8 (5.53% ratio with the dictionary vs 10.22% without). It's very useful for my specific case, since I'm using public key encryption on each Prometheus file before saving it to disk so that, if my relay is ever compromised, there will not be any sensitive metrics data lying around in plaintext. But because it has to encrypt it right away, the compressor's dictionary has to reinitialize for each file. Having this external dictionary helps.
https://1aeo.com/blog/tor-metricsport-zstd-dictionary.html https://1aeo.com/blog/data/tor-metrics-dict-0.4.9.15.txt
Thank you very much! This performs significantly better than the auto- generated dictionary that zstd is able to create with training.
Btw, how much of your testing is directed entirely by your LLM agent and how much are you involved with testing, methodology, writing, etc?
Regards, forest
participants (2)
-
forest -
Tor at 1AEO