A Python script that helps check the online status of a list of user-provided websites.
- Download Python (Project developed using Python 3.9)
- Clone this repository
- Run
python server_status.py
- Enter the name of the website you want to check including the protocol (http[s]) and the top-level domain
- Ex:
https://google.com
- Ex:
- Additionally install the dotenv module with
pip install python-dotenv
- Modify the
config_template.json
file replacing the provided placeholders with your own data in the same format.- The necessary configuration variables are:
- "recipients": List of strings representing email addresses to send status updates to
- "urls": List of strings representing website urls following same format as mentioned above
- "emails_fail_only": Boolean representing whether to send emails only if a status check fails.
- true indicates that you want the server to send an email when at least one status check fails.
- This can be used with a lower "check_interval_secs" to prevent a flood of emails while also having the status check run constantly.
- "check_interval_secs": Integer representing the number of seconds to delay another round of status checks.
- You can rename the file as you wish, just make sure to pass the correct name when calling the script.
- The necessary configuration variables are:
- Create a .env file with your gmail address and APP PASSWORD
- If you want to use a different mailing client, you will have to modify
perm_server_status
with the client's required configuration. - This program searches for environment variables named:
- USER_EMAIL
- APP_PASSWORD
- If you want to use a different mailing client, you will have to modify
- Run
python perm_server_status.py config_template.json
to start the program.- To stop the execution of the program, you can use CTRL-C or close the terminal instance.