I created a basic system metric logger for my girlfriend's PC that always crashes (smh). It sends out an alert email before it crashes so I can scream at them to close the 100 open Chrome tabs.
✅ Detects high CPU, RAM, and Disk usage.
✅ Sends an email before or after a system crash.
✅ Uses .env for storing credentials securely.
✅ Prevents repeated email alerts.
✅ Now supports Docker for easier deployment!
pip install -r requirements.txtCreate a .env file and add your email credentials:
EMAIL_USER=your_email@example.com
EMAIL_PASS=your_passwordpython monitor.pyIf you prefer using Docker, follow these steps:
docker build -t system_monitor .docker run --env-file .env system_monitorNow the system monitor will run inside a Docker container! 🎉