Agent Smith is a Python application designed to monitor website statuses and send email alerts using the Gmail API if any website becomes unavailable.
- Monitors the status of user-configured websites every 12 hours (43200 seconds).
- Sends email alerts via Gmail API when a website encounters an error or goes offline.
- Configurable check intervals.
- Python 3.7 or higher
- Gmail API credentials
- Python dependencies (installed automatically)
git clone https://github.com/jcastroo/agent-smith.git
cd agent-smith
pip install -r requirements.txt
pip install .
- Go to the Google Cloud Console.
- Create a project and enable the Gmail API.
- Download the credentials.json file and place it in the project directory.
The first time you run the script, it will open a Google authentication window for you to grant access to the API.
Run the monitor directly from the terminal:
agent-smith
Edit the main.py file to customize:
Website List: Add or remove websites in the Websites variable.
Check Interval: Adjust the check_interval value to set the time (in seconds) between checks.
Email Recipient: Update the email_receiver value with the recipient's email address for alerts.
requests
google-auth
google-auth-oauthlib
google-api-python-client
These dependencies are installed automatically during the setup process.
This project is licensed under the MIT License.