How ellouzati-mohammed/aiops-sentinel works
AIOps Sentinel monitors HDFS logs, groups events into blocks, predicts anomalies, and exposes live and historical monitoring views. The main path is log ingestion through parsing, template matching, block completion, prediction, persistence, and realtime notification; API routes serve those results to dashboard, logs, blocks, predictions, templates, models, anomalies, and metrics pages. System metrics are separately aggregated and periodically snapshotted. Edges reflect explicit imports/calls in sampled sources or documented frontend routes and API endpoints; unsampled features are retained as components where the tree and API inventory support them, without guessing their internal wiring.
Main entry points: App.tsx Page router · main.py FastAPI application · block_manager.py Block lifecycle · metrics_service.py Metrics aggregation
Components 34
Log processing
- HDFS log generator
simulator/hdfs_log_generator.py - Block lifecycle
backend/aiops-api/app/services/block_manager.py - Log parser
backend/aiops-api/app/services/log_parser.py - Template matching
backend/aiops-api/app/services/template_matcher.py
Prediction and storage
- Anomaly prediction
backend/aiops-api/app/services/predictor.py - Feature preparation
backend/aiops-api/app/services/preprocessing.py - PostgreSQL
- Database sessions
backend/aiops-api/app/database.py - Domain records
backend/aiops-api/app/models.py - Realtime broadcast
backend/aiops-api/app/services/realtime.py - Metrics aggregation
backend/aiops-api/app/services/metrics_service.py
Backend API
- Log ingestion
backend/aiops-api/app/routers/logs.py - Metrics scheduler
backend/aiops-api/app/scheduler/metrics_scheduler.py - FastAPI application
backend/aiops-api/app/main.py - Block sequences API
backend/aiops-api/app/routers/hdfs_sequences.py - Templates API
backend/aiops-api/app/routers/hdfs_templates.py - Models API
backend/aiops-api/app/routers/models.py - System metrics API
backend/aiops-api/app/routers/system_metrics.py - Health API
backend/aiops-api/app/routers/health.py
Monitoring UI
- Page router
frontend/src/App.tsx - Dashboard
frontend/src/pages/Dashboard.tsx - Live logs
frontend/src/pages/LiveLogs.tsx - Blocks view
frontend/src/pages/Blocks.tsx - Predictions view
frontend/src/pages/Predictions.tsx - Anomalies view
frontend/src/pages/Anomalies.tsx - Models view
frontend/src/pages/Models.tsx - Templates view
frontend/src/pages/Templates.tsx - Metrics view
frontend/src/pages/SystemMetrics.tsx - Settings view
frontend/src/pages/Settings.tsx - Metrics display
frontend/src/components/common/SystemMetrics.tsx - Realtime client
frontend/src/hooks/useRealtime.ts - Metrics history hook
frontend/src/hooks/useSystemMetricsHistory.ts
Other components
- Operator
- Elasticsearch
Connections 40
- Operator → HDFS log generator: generates logs
- HDFS log generator → Log ingestion: sends logs
- Operator → Page router: uses
- Log ingestion → Block lifecycle: processes logs
backend/aiops-api/app/routers/logs.py - Block lifecycle → Log parser: parses events
backend/aiops-api/app/services/block_manager.py - Block lifecycle → Template matching: matches templates
backend/aiops-api/app/services/block_manager.py - Block lifecycle → Anomaly prediction: predicts anomaly
backend/aiops-api/app/services/block_manager.py - Anomaly prediction → Feature preparation: prepares features
backend/aiops-api/app/services/predictor.py - Block lifecycle → Database sessions: opens session
backend/aiops-api/app/services/block_manager.py - Block lifecycle → Domain records: persists sequence
backend/aiops-api/app/services/block_manager.py - Database sessions → PostgreSQL: connects
backend/aiops-api/app/database.py - Domain records → Database sessions: uses Base
backend/aiops-api/app/models.py - Block lifecycle → Realtime broadcast: broadcasts events
backend/aiops-api/app/services/block_manager.py - FastAPI application → Realtime broadcast: serves websocket
backend/aiops-api/app/main.py - FastAPI application → Metrics scheduler: starts task
backend/aiops-api/app/main.py - Metrics scheduler → Metrics aggregation: collects snapshots
backend/aiops-api/app/scheduler/metrics_scheduler.py - Metrics aggregation → Database sessions: queries and saves
backend/aiops-api/app/services/metrics_service.py - Metrics aggregation → Domain records: reads metrics records
backend/aiops-api/app/services/metrics_service.py - Metrics aggregation → Elasticsearch: counts log events
backend/aiops-api/app/services/metrics_service.py - FastAPI application → Health API: mounts routes
backend/aiops-api/app/main.py - FastAPI application → Block sequences API: mounts routes
backend/aiops-api/app/main.py - FastAPI application → Templates API: mounts routes
backend/aiops-api/app/main.py - FastAPI application → Models API: mounts routes
backend/aiops-api/app/main.py - FastAPI application → System metrics API: mounts routes
backend/aiops-api/app/main.py - FastAPI application → Log ingestion: mounts routes
backend/aiops-api/app/main.py - Page router → Dashboard: routes to
frontend/src/App.tsx - Page router → Live logs: routes to
frontend/src/App.tsx - Page router → Blocks view: routes to
frontend/src/App.tsx - Page router → Predictions view: routes to
frontend/src/App.tsx - Page router → Anomalies view: routes to
frontend/src/App.tsx - Page router → Models view: routes to
frontend/src/App.tsx - Page router → Templates view: routes to
frontend/src/App.tsx - Page router → Metrics view: routes to
frontend/src/App.tsx - Page router → Settings view: routes to
frontend/src/App.tsx - Dashboard → Metrics display: renders
frontend/src/pages/Dashboard.tsx - Dashboard → Realtime client: uses events
frontend/src/pages/Dashboard.tsx - Metrics view → Metrics display: renders
frontend/src/pages/SystemMetrics.tsx - Metrics view → Metrics history hook: loads history
frontend/src/pages/SystemMetrics.tsx - Realtime client → FastAPI application: opens websocket
frontend/src/hooks/useRealtime.ts - Metrics history hook → System metrics API: requests history