启用metrics
openethereum --jsonrpc-interface 0.0.0.0 --jsonrpc-cors all --reseal-max-period 60000000 --metrics --metrics-interface=all
2023-01-30 11:33:12 Starting OpenEthereum
2023-01-30 11:33:12 State DB configuration: fast
2023-01-30 11:33:12 Operating mode: active
2023-01-30 11:33:12 Not preparing block; cannot sign.
2023-01-30 11:33:12 Configured for Hashii using AuthorityRound engine
2023-01-30 11:33:12 Signal for switch to contract-based validator set.
2023-01-30 11:33:12 Listening for new connections on 0.0.0.0:8546.
2023-01-30 11:33:12 Started prometeus metrics at http://0.0.0.0:3000/metrics
...
2023-01-30 11:37:16 Listening for new connections on 0.0.0.0:8546.
2023-01-30 11:37:16 Started prometeus metrics at http://0.0.0.0:3000/metrics
主机 dashboard
导入主机dashboard
查看主机 dashboard
私链 dashboard
导入私链 dashboard
部署gethexporter
start_gethexporter.sh
#!/bin/bash
docker run -it -d -p 9091:9090 --restart=always -e GETH="http://172.16.1.12:8545" hunterlong/gethexporter
prometheus.yml
- job_name: "wgchain"
static_configs:
- targets: ["localhost:9091"]
查看私链 dashboard