Web Monitor And Alert System Using Google Email App Password
A Flask-based web application that monitors website uptime and sends email alerts using Google Email App Password. This tool regularly checks the status of specified websites and notifies via email wh
About the Project
A Flask-based web application that monitors website uptime and sends email alerts using Google Email App Password. This tool regularly checks the status of specified websites and notifies via email when any site goes down.
Features
- Monitor multiple websites for uptime.
- Send email alerts when a website is down.
- Configurable check intervals and alert intervals.
- Uses Google Email App Password for sending alerts.
Requirements
- Python 3.x
- Flask
- Requests
- APScheduler
- Yagmail
- Logging
Installation
-
Clone the repository:
git clone https://github.com/yourusername/web-monitor-alert-system.git cd web-monitor-alert-system -
Install the required packages:
pip install -r requirements.txt -
Configuration: Edit the configuration settings in
app.pyto match your requirements, including websites to monitor, email settings, etc.
Usage
-
Run the Flask application:
python app.py -
Access the web interface: Open your web browser and navigate to
http://127.0.0.1:5000/.
How to Generate Google Email App Password
To send email alerts, you need to generate a Google Email App Password. Follow these steps:
-
Enable Two-Factor Authentication:
- Go to your Google Account: https://myaccount.google.com/
- Click on "Security" in the left-hand menu.
- Under "Signing in to Google," click on "2-Step Verification" and follow the steps to set it up.
-
Generate App Password:
- After enabling 2-Step Verification, return to the "Security" section.
- Under "Signing in to Google," click on "App Passwords."
- You might need to sign in again.
- At the bottom of the screen, click on "Select app" and choose "Other (Custom name)".
- Enter a custom name (e.g., "Web Monitor") and click "Generate."
- Google will display a 16-character app password. Copy this password.
-
Update Email Settings in the Code:
- In
app.py, update theEMAIL_USERandEMAIL_PASSWORDvariables with your email and the generated app password.
EMAIL_USER = "your-email@gmail.com" EMAIL_PASSWORD = "your-app-password" # Replace with the 16-character app password - In
Example Configuration
Here's an example configuration in app.py:
WEBSITES = [ {"url": "https://www.linkedin.com/", "title": "Linkedin"}, {"url": "https://www.youtube.com/", "title": "Youtube"} ] CHECK_INTERVAL = 2 # seconds ALERT_INTERVAL_FIRST = 15 # seconds for the first alert ALERT_INTERVAL_SUBSEQUENT = 1800 # seconds (30 minutes) ALERT_EMAILS = ["any-email@example.com", "another-email@example.com"] EMAIL_USER = "your-email@gmail.com" EMAIL_PASSWORD = "your-app-password" # Replace with your app password
Project Timeline
Technologies
External Links
Related Projects
Projects built with similar technologies.
Online Html Editor And Viewer
The Online HTML Editor and Viewer is a simple web application built with Flask that allows users to write and preview HTML code in real-time.
Qrgen
A premium, feature-rich QR Code Generator engineered with Python (Flask) and a pristine Glassmorphism frontend.
Examina Ai
Using AI, It transforms raw study materials into structured, verified examination sets with support for institutional export formats like Moodle XML.