#metrics #beacon #ethereum #collect #api-url #group-id

app beacon-metrics-gazer

给定一系列索引收集整个网络的参与度指标

6个版本

0.1.5 2023年8月9日
0.1.4 2023年8月8日
0.1.3 2023年6月20日
0.1.1 2023年4月7日

#2751 in 神奇豆

MIT/Apache

4MB
831

beacon-metrics-gazer

给定一系列索引收集整个网络的参与度指标

Collects network wide participation metrics given a range of indexes

Usage: beacon-metrics-gazer [OPTIONS] <URL>

Arguments:
  <URL>  Beacon HTTP API URL: http://1.2.3.4:4000

Options:
  -H, --headers <HEADERS>          Extra headers sent to each request to the beacon node API at `url`. Same format as curl: `-H "Authorization: Bearer {token}"`
      --ranges <RANGES>            Index ranges to group IDs as JSON or TXT. Example: `{"0..100": "lh-geth-0", "100..200": "lh-geth-1"}
      --ranges-file <RANGES_FILE>  Local path or URL containing a file with index ranges with the format as defined in --ranges
      --dump                       Dump participation ranges print to stderr on each fetch
  -p, --port <PORT>                Metrics server port [default: 8080]
      --address <ADDRESS>          Metrics server bind address [default: 127.0.0.1]
  -v, --verbose                    Increase verbosity level
  -h, --help                       Print help
  -V, --version                    Print version

将范围文件上传到某处持久存储,例如Github Gist非常方便

docker run dapplion/beacon-metrics-gazer http://80.1.2.80:4000 --ranges-file https://pastebin.com/raw/FfJdfJrV

范围文件的格式非常灵活,可以是JSON、YAML或纯文本

0-500 Nethermind lighthouse-0
500-1000 Nethermind lighthouse-1
1000-1500 Nethermind teku-0
1500-2000 Nethermind teku-1
2000-2500 Nethermind lodestar-0
2500-3750 Gateway lh + nethermind
3750-5000 Gateway lh + nethermind

来自Docker Hub

docker run dapplion/beacon-metrics-gazer --help

二进制使用

cargo install beacon-metrics-gazer
beacon-metrics-gazer --help

依赖关系

~14–28MB
~427K SLoC