GithubHelp home page GithubHelp logo

leapdao / eth-node-healthcheck Goto Github PK

View Code? Open in Web Editor NEW
10.0 7.0 17.0 26 KB

Geth/Parity node healthcheck endpoint. Check the node is in sync with the network

License: MIT License

JavaScript 100.00%
ethereum geth healthcheck aws load-balancer monitoring etherscan-api nodejs

eth-node-healthcheck's Introduction

eth-node-healthcheck

Little http node.js server to run along the ethereum node. Node needs to have JSONRPC enabled. Returns 503 Service Unavailable if the last block number on the local node is off by 3 or more blocks from the last block number from Infura node. Otherwise returns 200 OK.

Supported networks:

Installation

npm install -g eth-node-healthcheck

Run

Configuration parameters (set as ENV variables):

  • RPC_HOST — hostname where your node JSON RPC is running. Default: localhost

  • NETWORK — network name. Supported networks:

    • homestead
    • rinkeby
    • ropsten
    • kovan
    • goerli
  • PORT — port to run this service on

Example for mainnet:

RPC_HOST=127.0.0.1 NETWORK=homestead PORT=50336 eth-node-healthcheck

Make sure the process is detached from the terminal. Make sure the port is open for incoming connections.

License

MIT

eth-node-healthcheck's People

Contributors

johannbarbie avatar pinkiebell avatar troggy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

eth-node-healthcheck's Issues

Ropsten support

Any particual reason why this healthcheck only supports rinkeby and mainnet?
I'm trying to set this up for my ropsten nodes too (it works great on mainnet nodes) but it doesn't work (returned values are always as if the node is on mainnet)

Is there any simple way to bypass this and use ropsten provider?

etherscan api key not used

Hey,

thanks for this module. While reviewing the code I noticed that there seems to be no usage of the etherscan api key. So it won't be used at all, is that right? I assume it still works, because etherscan is kind of lazy about api key usage, though.

Best,

Caspar.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.