Skip to content

Checking if your Ethereum node is alive or not?

Notifications You must be signed in to change notification settings

defisapiens/Eth-Ping

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

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

Conclusion

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

About

Checking if your Ethereum node is alive or not?

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%