An ultra-lightweight, real-time log monitoring daemon written in C++17. Designed for Odoo ERP environments, odoo-log-sentinel tails log files and uses compiled Regex patterns to instantly detect critical server errors, Python tracebacks, or potential security breaches (like brute force login attempts).
While tools like Fail2Ban (Python) exist, they can consume significant resources when parsing high-volume logs. This daemon is designed to operate with a near-zero footprint, making it ideal for high-traffic production servers or resource-constrained utility nodes.
- Real-Time Detection: Processes new log lines instantly as they are written.
- Regex Engine: Uses C++
std::regexfor flexible pattern matching. - Low Overhead: Efficient file seeking prevents re-reading old data.
- Customizable Rules: Easily add new detection patterns for specific Odoo modules or business logic errors.
g++ -std=c++17 -O2 log_sentinel.cpp -o sentinel
### 2. Configure
Edit the LOG_FILE_PATH in log_sentinel.cpp to point to your Odoo log (e.g., /var/log/odoo/odoo-server.log or /var/log/nginx/access.log).
### 3. Run
Run as a background process:
'''Bash
./sentinel &
### Tip: For production, create a systemd service file to ensure it auto-starts on boot.
Configuration Examples
**The tool comes pre-configured to catch common Odoo issues:**
Critical: Internal Server Error (HTTP 500)
Error: Traceback (Python Code Crashes)
Warning: Login failed (Potential Brute Force)
### Roadmap
[ ] Integrate libcurl for native Slack/Discord Webhook alerts.
[ ] Add support for watching multiple log files simultaneously (e.g., Odoo + PostgreSQL logs).
[ ] Implement a "quiet hours" feature to suppress non-critical warnings.
### Maintained By
### Coqui Cloud - IT Solutions & Custom Software