Ir al contenido
Back to Portfolio

odoo-log-sentinel

Author
RamonRiosJr
Repository Author

Odoo Log Sentinel

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).

Why C++?

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.

Features

  • Real-Time Detection: Processes new log lines instantly as they are written.
  • Regex Engine: Uses C++ std::regex for 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.

Installation

1. Compile

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

Recent Activity

Update README.md2026-01-26
Ramon Rios
Add Odoo Log Sentinel for monitoring logs2026-01-26
Ramon Rios
Initial commit2026-01-26
Ramon Rios

About Ramon Rios Jr's Tech Stack

As a Senior Systems Architect and Full Stack Developer, I specialize in building scalable, enterprise-grade applications. My expertise spans across modern backend frameworks using Python, comprehensive ERP deployments with Odoo, and highly interactive frontend architectures. The open-source GitHub repositories listed above demonstrate my proficiency in API development, database optimization, system integrations, and automation. Whether crafting custom business logic or designing sleek glassmorphic user interfaces, I am committed to delivering high-performance software solutions.