Stateless metrics and health-checks for openethereum/parity nodes
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Mohamed Sohail 8d7acc0f84
docs: update info
1 year ago
cmd/node-status release: v0.0.1 1 year ago
config release: v0.0.1 1 year ago
internal/server metrics: add pending tx and peer count 1 year ago
pkg add: hex2uint64 util 1 year ago
.dockerignore release: v0.0.1 1 year ago
.gitignore release: v0.0.1 1 year ago
Dockerfile release: v0.0.1 1 year ago
LICENSE docs: add license 1 year ago
Makefile release: v0.0.1 1 year ago
README.md docs: update info 1 year ago
go.mod project: update go pkg path 1 year ago
go.sum project: init 1 year 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