Skip to content

Agent Smith is a Python-based monitoring script that periodically checks the availability of user-configured websites and sends email alerts in case any of the websites are down.

License

Notifications You must be signed in to change notification settings

jcastroo/Agent-Smith

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Agent Smith

Agent Smith is a Python application designed to monitor website statuses and send email alerts using the Gmail API if any website becomes unavailable.

Features

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

Requirements

  • Python 3.7 or higher
  • Gmail API credentials
  • Python dependencies (installed automatically)

Installation

1. Clone the repository

git clone https://github.com/jcastroo/agent-smith.git
cd agent-smith

2. Requirements

pip install -r requirements.txt

3. Install the package

pip install .

4. Configure Gmail API credentials

  1. Go to the Google Cloud Console.
  2. Create a project and enable the Gmail API.
  3. Download the credentials.json file and place it in the project directory.

5. Authenticate the user

The first time you run the script, it will open a Google authentication window for you to grant access to the API.

6. Usage

Run the monitor directly from the terminal:

agent-smith

7. Configuration

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.

8. Dependencies

requests
google-auth
google-auth-oauthlib
google-api-python-client

These dependencies are installed automatically during the setup process.

9. License

This project is licensed under the MIT License.

Created by João Castro.

About

Agent Smith is a Python-based monitoring script that periodically checks the availability of user-configured websites and sends email alerts in case any of the websites are down.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages