DEV Community

DoctorLai
DoctorLai

Posted on

A Simple Health Check Tool

health-checks

A Simple Health Check Tool

Background

CloudFlare provides Health Checks but you have to be on a paid plan. Vultr provides Free-Tier VPS (512 MB, 1 Core, 10 GB SSD, 2 TB Bandwidth).

This lightweight VPS does not have much RAM - so it cannot run heavy applications, but this (health check) tool should be a good use case for it.

Acknowledgement

Most code at the "init commit" is done by ChatGPT. Thank you!

How to Run?

No docker - as you probably can't run docker on it. You can either run it in screen or pm2 so that it will stay in background.

Config.json

Change config.json.sample to config.json and modify the content necessary - which should be pretty straightforward.

Run Health-Checks

Simply Run node health-checks.js,

Example:

image

In case of failures:

d59cb84041082bcf257cadacf9f434d

You should get an email, if configured correctedly.

efcef2260e1f5815890b0035ecfcba7

TODO:

Configure a max email per period (PR welcome)

Support

If you find this useful, why not buy me a coffee? Thanks!

Github: https://github.com/DoctorLai/health-checks


Steem to the Moon!

  1. You can swap the STEEM/SBD to USDT (TRC-20) via Steem2USDT
  2. Register a free STEEM account at here

https://justyy.com/png/whale.png

Top comments (0)