Code Monkey home page Code Monkey logo

drp-site-checker's Introduction

DRP - Site Checker

Disaster Recovery Plan - Site checker

Checks given site for availability - if not fixed after amount of times checked. Notify users via email.

Flow of this tool:

    1. Checks given site every given frequency (uses cron)
    1. If that site is not giving a status code 200 or gives a timeout. It checks that site again after a given amount of minutes
    1. If that site is still unavailable it sends an email to the given admin email.
    1. When the DRP has found that the site is down for a given amount of times it also sends an email to an email list.

How to use

  • Use as Docker container:

    Pull the container first: docker pull ghcr.io/kdssoftware/drp

    • Use with .env file:
    #Fill in all the .env.local fields
    docker run --name drp -t ghcr.io/kdssoftware/drp:latest --env-file ./.env.local
    • Use with env variables:
    #For info about a variable, check the .env.local file
    docker run --name drp -t ghcr.io/kdssoftware/drp:latest \
    --env URL="123456789.com" \
    --env FREQUENCY="0 * * * *" \
    --env MAXFAILURECOUNTER=24 \
    --env ADMINEMAIL="[email protected]" \
    --env EMAILLIST="[email protected],[email protected]" \
    --env EMAILTEXT="this is an example\DRP notification" \
    --env EMAILSUBJECT="Site is down - notification" \
    --env TIMEOUT=3000 \
    --env FROMEMAIL="[email protected]" \
    --env WAITUNTILRECHECK=5 \
    --env SMTPSERVER="smtp.server.com" \
    --env SMTPPASSWORD="abc123" \
    --env SMTPPORT=587
  • From source

    • Clone this repository

    • Fill in .env.local

    • cp .env.local .env

    • uncomment index.js:1 (require('dotenv').config();)

    • yarn install or npm install

    • node .

drp-site-checker's People

Contributors

snakehead007 avatar

Stargazers

 avatar  avatar

Watchers

 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.