Open
Description
System information
Geth version: v1.10.26
Geth Args
exec geth --authrpc.jwtsecret=/secret/jwtsecret --authrpc.addr=0.0.0.0 --authrpc.port=8551 --authrpc.vhosts=* --http --http.addr=0.0.0.0 --http.port=8599 --http.corsdomain= --http.vhosts=* --http.api=web3,eth,net,engine --nat=extip:$(POD_IP) --port=30303 --ws --ws.addr=0.0.0.0 --ws.port=8546 --ws.origins=* --ws.api=web3,eth,net,engine --datadir=/data/ethereum --ethash.dagdir=/data/ethereum/.ethash --ipcdisable --goerli "--syncmode=snap" "--metrics" "--pprof" "--pprof.addr=0.0.0.0" "--pprof.port=6060" "--metrics.expensive"
- http.port=8599
- metrics port= 6060
I tried to call eth_blockNumber rpc many times. When requesting the metrics interface, the first time I have data, and later I access the metrics stats again as 0.
# curl eth_blockNumber jsonRPC
curl -i -X POST -H 'content-type: application/json' --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' http://localhost:8599
HTTP/1.1 200 OK
Content-Type: application/json
Date: Thu, 29 Dec 2022 11:56:13 GMT
Content-Length: 45
{"jsonrpc":"2.0","id":1,"result":"0x7d70e8"}
# check metrics
curl localhost:6060/debug/metrics/prometheus | grep eth_blockNumber
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 48729 100 48729 0 0 51151 0 --:--:-- --:--:-- --:--:-- 51347
# TYPE rpc_duration_eth_blockNumber_success_count counter
rpc_duration_eth_blockNumber_success_count 1
# TYPE rpc_duration_eth_blockNumber_success summary
rpc_duration_eth_blockNumber_success {quantile="0.5"} 27
rpc_duration_eth_blockNumber_success {quantile="0.75"} 27
rpc_duration_eth_blockNumber_success {quantile="0.95"} 27
rpc_duration_eth_blockNumber_success {quantile="0.99"} 27
rpc_duration_eth_blockNumber_success {quantile="0.999"} 27
rpc_duration_eth_blockNumber_success {quantile="0.9999"} 27
# check metrics again
curl localhost:6060/debug/metrics/prometheus | grep eth_blockNumber
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 48747 100 48747 0 0 36100 0 0:00:01 0:00:01 --:--:-- 36189
# TYPE rpc_duration_eth_blockNumber_success_count counter
rpc_duration_eth_blockNumber_success_count 0
# TYPE rpc_duration_eth_blockNumber_success summary
rpc_duration_eth_blockNumber_success {quantile="0.5"} 0
rpc_duration_eth_blockNumber_success {quantile="0.75"} 0
rpc_duration_eth_blockNumber_success {quantile="0.95"} 0
rpc_duration_eth_blockNumber_success {quantile="0.99"} 0
rpc_duration_eth_blockNumber_success {quantile="0.999"} 0
rpc_duration_eth_blockNumber_success {quantile="0.9999"} 0
Even if I access the interface again, the query metrics are all 0