Skip to content

Background Services

MainMonitor (Lib/monitor.py) is the background service entry point of the platform. It loads Playbook configurations at startup and launches the following three types of background tasks:

Background TaskResponsibility
Module EngineContinuously consumes Redis Streams, processing raw alerts into Alert/Case
Playbook ExecutionPolls pending Playbook records and dispatches them to the thread pool for execution
Auto AnalysisSchedules due Cases and invokes LLM to generate investigation reports

Key Files

FilePurpose
Lib/monitor.pyBackground service entry point, orchestrates all background tasks
Lib/moduleengine.pyModule discovery, loading, and run loop
Lib/basemodule.pyModule base class, provides message consumption interface
Lib/playbookloader.pyPlaybook discovery and configuration loading
Lib/threadmodulemanager.pyGeneric thread task executor
PLUGINS/SIRP/analysis.pyCase analysis pipeline (LLM invocation)
PLUGINS/SIRP/sirpapi.pyCase scheduling model (mark/promote)