This project uses Python and GitHub Actions to check multiple platforms (named URLs) twice daily, generate PDF reports, and email results when failures occur.
-
Add secrets in your GitHub repo (Settings → Secrets and variables → Actions):
- URL_: One secret per platform, e.g.
URL_GOOGLE=https://google.in - EMAIL_HOST, EMAIL_PORT, EMAIL_USER, EMAIL_PASS, EMAIL_TO: SMTP email credentials
- EMAIL_TO accepts one or more recipients separated by commas or semicolons, e.g.
ops@example.org,alerts@example.org - ALLOW_403_FOR: Optional comma-separated domains where HTTP 403 should be treated as expected
- DISABLED_GROUPS: Optional comma-separated URL groups to skip, e.g.
OBI,JH
- URL_: One secret per platform, e.g.
-
Install dependencies locally:
pip install -r requirements.txt
-
Run script locally:
python scripts/main.py
The monitor sends email only when one or more URLs fail.
Useful local test modes:
# Run checks and generate a failure report, but do not send email python scripts/main.py --dry-run # Generate a report without sending email python scripts/main.py --report-only # Generate a report that includes successful checks too python scripts/main.py --report-only --include-successes
Runtime tuning options:
python scripts/main.py --timeout 10 --retries 2 --retry-delay 1 --workers 8
-
Run tests locally:
python -m unittest discover -s tests
The workflow (.github/workflows/platform_monitor.yml) runs daily at 10 AM IST (04:30 UTC) and 10 PM IST (16:30 UTC). It sends email reports automatically, attaching a PDF of any failures.
Feel free to open issues or pull requests to improve functionality.