Git Product home page Git Product logo

eth-ping's Introduction

Eth-Ping

Checking if your Ethereum node is alive or not?

A simple NodeJs Script which checks your Ethereum Node is alive

What does our Script do?

The script will continuously call “eth_blockNumber” in every 15 seconds and check if the node is responding properly or not?

Configuration

We have added a config.json which you need to change accordingly.

  • rpcURL — Add your Node RPC URL

  • email — Add Your Email

  • password — Add Your Email Password

  • recipient- Add recipients URL

  • emailSubject — Add email subject

  • emailText — Add email Text

  • emailHtml — Add email text in HTML (If this is configured, our script will ignore above plain email text (emailText))

Allow less secure app if you want to use Gmail mail service, Follow this doc and Change account access for less secure apps

We are using Gmail, So you need to change a security setting for your Gmail account, check this doc. Also, you need to change a few variables, such as add your node URL and add your Gmail username and password. Also, change from and to and other things accordingly related to Mail which will get send when the script will detect that your node is down.

Send Test Email

Once the configuration is done we can test our email setup by running below command.

npm run testmail

How to run it?

You need to install NodeJs and clone the repository.

  • Check this for installing NodeJs

    git clone https://github.com/buddies2705/Eth-Ping
    
    npm install
    
    npm start
    

We recommend you to use PM2 to run above script, as it restarts the script if it gets crashed for XYZ reason.

How to deploy this service using PM2

  • Install PM2 on your system using NPM package manager :

    npm i pm2 -g

  • Assuming you have installed all project dependicies and changed the config values :

    pm2 start pm2launch.config.js --env production

To do : The service can dynamically pass the config values from the PM2 launch script.

Conclusion

We will be tweaking it over time and encourage you to use this script. Feedbacks, Comments, and Pull Requests are welcome.

eth-ping's People

Contributors

buddies2705 avatar mannutech avatar

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.