A Bash script that monitors CPU, memory, and disk usage on macOS and alerts when thresholds are exceeded.
Built as a learning project to develop skills in shell scripting, system monitoring, and logging — core skills for SRE and DevOps roles.
- Monitors CPU, memory, and disk usage in real time
- Fires alerts when usage exceeds defined thresholds
- Logs results to a timestamped log file for historical tracking
- Lightweight — no dependencies, pure Bash
- Runs automatically every hour via GitHub Actions CI/CD pipeline
- Compatible with both macOS and Linux
1. Clone the repo
git clone https://github.com/evsybut/system-monitor.git
cd system-monitor2. Make the script executable
chmod +x monitor.sh3. Run it
./monitor.sh- Bash scripting and control flow
- Reading system metrics on macOS and Linux
- Cross-platform scripting
- File logging and timestamps
- GitHub Actions CI/CD pipeline configuration
- YAML workflow syntax
- Cron scheduling
- Git and GitHub workflow
- Add email or Slack alerts when thresholds are breached
- Store results in a database for historical tracking
- Build a simple dashboard to visualise uptime history
- Add more metrics (network usage, running processes)