A cron-based Bash project to monitor Linux system health and generate hourly logs.
Automates monitoring of disk, CPU, memory, and top processes, with optional email or Slack notifications.
- Monitor disk usage
- Monitor CPU load averages
- Monitor memory usage
- Track top 5 processes by CPU
- Auto-save logs to
/var/log/system_health/ - Optional Email or Slack notifications
Scheduled_System_Health_Reporter/
β
ββ docs/ # Logs generated by the script
β ββ health_2025-09-27_10-06-36.log # Sample log file
ββ README.md # Project documentation
ββ system_health_reporter.sh # Main Bash script
- Make the script executable:
chmod +x system_health_reporter.sh- Run the script manually to generate a report:
./system_health_reporter.sh --report- Install hourly cron job to automate reporting:
./system_health_reporter.sh --install- Install mail utilities:
sudo apt install -y mailutils- Configure the script with your email address to receive system health reports.
- Create a Slack Incoming Webhook (refer to Slack documentation).
- Add the webhook URL to the script configuration for Slack alerts.
- Linux system monitoring
- Bash scripting for automation
- Cron job setup
- Basic log management
- Optional integration with Email/Slack notifications
- Logs are stored in
/var/log/system_health/by default. Ensure the directory exists and is writable. - Customize the top processes or reporting intervals by editing the script.
- Use this for personal servers, lab setups, or small office monitoring.