Code Monkey home page Code Monkey logo

website_pinger's Introduction

Website Pinger

GitHub issues GitHub forks GitHub stars GitHub license

Ping a server checking that it is alive. If it is not, then sends an email notifying the server is down.

Would recommend using this along with a cron job which would periodically run the script.

Requirements

  • Python 3

Usage

website_pinger.sh server_address [options]

  -c, --config-file Path to the config file.
  -f, --mail-from   Email from address
  -t, --mail-to     Email to address
  -i, --host        Email host
  -j, --port        Email port
  -u, --user        Email user
  -p, --password    Email password
  -s, --subject     Subject
  -a, --msg-prefix  Text to the added to the beginning of the email body.
  -z, --msg-suffix  Text to be added to the end of the email body.

Any parameters defined in the config file will be overwritten by any of the other optional arguments.

The config file should be a JSON file. Example is below. Do note, that not all keys need to be defined, some can be provided via the other arguments.

{
  "HOST": "smtp.host",
  "PORT": 587,
  "USER": "username",
  "PASSWORD": "password",
  "TO": "[email protected]",
  "FROM": "[email protected]"
}

Not all keys need to exist in the the config, those which are not in the config must be at least provided as arguments when calling the script.

website_pinger's People

Contributors

salaah01 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  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.