How jordanchendev/system_guardian works
Project Overview
• System Guardian is a real-time, incident management system. It automates incident ingestion from various sources (Datadog, GitHub, Jira, etc.), processes events, and uses AI-driven services (with GPT-4o based engines and a Qdrant vector database) to suggest remediation steps and resolutions.
• It is built using FastAPI with a microservice-like internal modular structure. It integrates with external messaging systems (RabbitMQ), a relational database (PostgreSQL), and a vector DB (Qdrant). The project also includes integrations for Slack notifications and Jira ticketing.
Key Components
• External Integrations:
• Webhooks from services such as Datadog, GitHub, and Jira.
• Slack for notifications (via system_guardian/services/slack).
• Possibly other external inputs (e.g., Datadog alerts).
• Ingestion Layer:
• Endpoints under system_guardian/web/api/ingest handle incoming webhook payloads.
• These endpoints further channel events to the internal processing pipelines.
• Messaging/Queueing:
• RabbitMQ is used as the primary message broker (as seen in system_guardian/services/rabbit and described in the documentation).
• Event Consumer Service:
• The event_consumer_service (system_guardian/event_consumer_service.py) listens to the RabbitMQ queues.
• It picks up events for further processing.
• Database and Persistence:
• PostgreSQL holds core incident and event data.
• The project’s DB directory (system_guardian/db) shows scripts to create, drop, or reset tables and models (e.g., incidents and events).
• AI and Analysis Engine:
• Under system_guardian/services/ai, several modules handle incident detection, similarity search, severity classification, and report/resolution generation.
• The AI engine utilizes retrieval techniques and possibly GPT-based models.
• Vector Database:
• Qdrant is integrated for vector search; system_guardian/services/vector_db and its client (qdrant_client.py) handle this.
• Configuration and Rules:
• The config services (system_guardian/services/config) load incident rules and other configuration settings.
• Web/API Interface:
• The FastAPI application (system_guardian/web) exposes endpoints with various submodules (e.g., API endpoints for echo, incidents, ai_engine, config, etc.).
• It also provides auto-generated Swagger documentation.
• Logging & Monitoring:
• There’s a dedicated logging configuration (system_guardian/logging and logging_config.py).
• The README also mentions integration with Datadog and use of ELK for logging and monitoring.
Architectural Patterns and Design Principles
• Microservices and modular architecture: Even though the codebase is organized as a single package, its internal structure (services, ingestion, AI, DB logic) suggests modular separation of concerns.
• Event-driven architecture: Use of RabbitMQ for queueing and asynchronous processing.
• Separation of Presentation, Logic, and Data layers: The FastAPI endpoints are separated from the processing (AI, logging) and persistence services.
• Extensibility: Modular design in the AI engine and integration modules (slack, jira, vector_db) points to a pluggable, extendable platform.
• Review the documentation and file structure to confirm the identified modules and their interactions.