LogGuardian is a lightweight Bash-based log monitoring utility that continuously watches Linux log files for suspicious activity and immediately alerts administrators when predefined security events are detected.
Developed as a practical Linux administration and security project, LogGuardian demonstrates real-time log monitoring, pattern matching, process automation, and proactive incident detection using standard Linux command-line tools.
- 📖 Monitors log files in real time
- 🚨 Detects suspicious log entries using configurable keywords
- ⚡ Generates immediate alerts when threats are detected
- 🔍 Uses efficient real-time monitoring with
tail -F - 🐧 Lightweight and compatible with most Linux distributions
- 🔧 Easily customized to monitor different log files and search patterns
LogGuardian/
├── log-guardian.sh
├── test.log
└── README.md
Clone the repository:
git clone https://github.com/Kachinonye/LogGuardian.gitNavigate to the project directory:
cd LogGuardianMake the script executable:
chmod +x log-guardian.shRun the monitoring tool:
./log-guardian.shLogGuardian continuously watches the configured log file and immediately reports suspicious activity.
Example keyword:
unauthorized access attempt
Example alert:
🚨 ALERT!
Suspicious activity detected:
unauthorized access attempt
The detection keyword can easily be changed to monitor other security events.
This project showcases practical experience with:
- Linux System Administration
- Bash Shell Scripting
- Real-Time Log Monitoring
- Pattern Matching
- Linux Security Monitoring
- Automation
- Incident Detection
- Technical Documentation
LogGuardian is useful for:
- Linux System Administrators
- Junior DevOps Engineers
- Security Enthusiasts
- Home Lab Monitoring
- Small Linux Server Deployments
- Bash Scripting Practice
Future releases may include:
- Multiple keyword monitoring
- Email alert notifications
- Slack and Discord integrations
- Configurable rules file
- Colourized terminal output
- Timestamped alert logging
- JSON alert export
- Monitoring multiple log files simultaneously
Kachinonye Nmezi
Junior Linux Administrator | Bash Scripting & Automation Specialist
GitHub: https://github.com/Kachinonye
LinkedIn: https://www.linkedin.com/in/kachinonye-nmezi-74170723b/
Licensed under the MIT License.