You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
2 years ago | |
---|---|---|
cmd/node-status | 2 years ago | |
config | 2 years ago | |
internal/server | 2 years ago | |
pkg | 2 years ago | |
.dockerignore | 2 years ago | |
.gitignore | 2 years ago | |
Dockerfile | 2 years ago | |
LICENSE | 2 years ago | |
Makefile | 2 years ago | |
README.md | 2 years ago | |
go.mod | 2 years ago | |
go.sum | 2 years ago |
README.md
openethereum-node-status
A tiny stateless service to return health status and useful metrics from OpenEthereum/Parity nodes using batched RPC queries. Requires the following API's to be enabled:
- eth
- parity
Usage
Default config:
RPC_ENDPOINT=https://core.bloxberg.org
SERVER_PORT=80
DEBUG_ENABLED=false
Build and run:
make build
docker build -t node-status:latest .
docker run --rm -p 5555:80 node-status:latest
Pre-build Docker image is available at docker.grassecon.net/devops/node-status:latest
Use with any uptime tracker and/or metrics scrapper.
Endpoints
/health
:
{
"chainName": "bloxberg",
"syncComplete": true
}
/metrics
:
{
"blockNumber": 13421262,
"enode": "enode://0fb17be7e259fee00d0c123c82dfd9cde74763683b7773a1d764a472436362c3031eac591721c02f754ba22140bb654f69261a7dc79143419a3ff8aff1298cce@130.183.206.234:30303",
"gasPrice": 0,
"peerCount": 5,
"pendingTransactions": [
{
"hash": "0x04b39537eaed56bdab1309d6f2dd6a2618f1725db3709d345a15cc967bb4481f",
"from": "0xfc6771c7bd523403327d8fe84b63c3262c2007d6",
"to": "0x105e668e389620d5588847c35fb91ea096f465ca"
}
],
"pendingTransactionsCount": 1
}
In-case of any issues, the endpoints return a 503
error
Development
DEBUG_ENABLED=true go run cmd/node-status/main.go