Coder Social home page Coder Social logo

andy-wu12 / server-status-notifier Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 18 KB

Two Python CLI programs that help you check the online status of a website. One runs temporarily where you manually check one website at a time, while the other allows you to configure the program to constantly check a list of websites and send you status updates through email.

License: MIT License

Python 100.00%
notifications cli email python python3 website-status server-status

server-status-notifier's Introduction

Website Status Notifier

A Python script that helps check the online status of a list of user-provided websites.

MIT License

Python Git

Installation

  1. Download Python (Project developed using Python 3.9)
  2. Clone this repository

Ways to use

1. Temporarily

  1. Run python server_status.py
  2. Enter the name of the website you want to check including the protocol (http[s]) and the top-level domain
    1. Ex: https://google.com

2. Permanently

  1. Additionally install the dotenv module with pip install python-dotenv
  2. Modify the config_template.json file replacing the provided placeholders with your own data in the same format.
    1. The necessary configuration variables are:
      1. "recipients": List of strings representing email addresses to send status updates to
      2. "urls": List of strings representing website urls following same format as mentioned above
      3. "emails_fail_only": Boolean representing whether to send emails only if a status check fails.
        1. true indicates that you want the server to send an email when at least one status check fails.
        2. This can be used with a lower "check_interval_secs" to prevent a flood of emails while also having the status check run constantly.
      4. "check_interval_secs": Integer representing the number of seconds to delay another round of status checks.
    2. You can rename the file as you wish, just make sure to pass the correct name when calling the script.
  3. Create a .env file with your gmail address and APP PASSWORD
    1. If you want to use a different mailing client, you will have to modify perm_server_status with the client's required configuration.
    2. This program searches for environment variables named:
      1. USER_EMAIL
      2. APP_PASSWORD
  4. Run python perm_server_status.py config_template.json to start the program.
    1. To stop the execution of the program, you can use CTRL-C or close the terminal instance.

server-status-notifier's People

Contributors

andy-wu12 avatar

Stargazers

 avatar

Watchers

 avatar

server-status-notifier's Issues

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.