Sentinel Plugins β Detector Documentation¶
The sentinel-plugins repository ships 11 detectors, each reading log streams produced by Sentinel Overhealth and reporting incidents to the central Sentinel API.
Detector Overview¶
| Plugin | Input | Severity | Auto-Heal | AI |
|---|---|---|---|---|
| audit_detector | audit.log | WARNING / CRITICAL | β | β |
| availability_detector | availability.log | CRITICAL | β | β |
| capacity_detector | capacity.log | WARNING / CRITICAL | β | β |
| ha_detector | homeassistant.log (HA JSON) | INFO / CRITICAL | β | β |
| port_detector | ports.log (ss -tuln) | WARNING / CRITICAL | β | β |
| security_detector | security.log (fail2ban) | WARNING | β | β |
| services_detector | services.log | CRITICAL | β | β |
| storage_detector | storage.log (ZFS) | CRITICAL | β | β |
| system_detector | system.log (journalctl) | CRITICAL | β | β |
| temperature_detector | temperature.log (sysfs) | WARNING / CRITICAL | β | β |
| detector_universal_security | auth.log / syslog | INFO / WARNING / CRITICAL | β | β |
Architecture¶
[ Plugin Manager ]
β
βββ Scans /plugins/*.py
βββ Verifies inheritance from BaseDetector
βββ Routes log lines by file mask
β
ββββββββββββΌβββββββββββ¬βββββββββββ
βΌ βΌ βΌ βΌ
audit_ avail_ capacity_ univ_sec_
detector detector detector detector
β β β β
βΌ βΌ βΌ βΌ
DB write Auto-heal DISK_FULL| AI enqueue
Every detector inherits from BaseDetector (base.py). The Plugin Manager dynamically loads all *.py files, validates the interface, and passes log lines by matching file masks.
Auto-Heal Detectors¶
Three detectors automatically close incidents without admin action:
availability_detector¶
"HOST_DOWN" β api.report_problem(key) β UI: π΄ CRITICAL
"STATUS: UP" β api.resolve_problem(key) β UI: π’ OK (auto-closed)
temperature_detector¶
temp_c >= 85 β CRITICAL β api.report_problem()
temp_c >= 75 β WARNING β api.report_problem()
temp_c < 75 β OK β api.resolve_problem() β Auto-Heal
Temperature values above 1000 are assumed to be millidegrees and divided by 1000.
storage_detector¶
"STATUS: HEALTHY" β api.resolve_problem() β Auto-Heal
any other text β api.report_problem()
AI Detector β universal_security¶
The only detector with direct AI integration. Processes auth.log and syslog.
if "Failed password" or "Invalid user":
severity = WARNING # brute-force activity
elif "sudo: incorrect password":
severity = CRITICAL # privilege escalation attempt
elif "COMMAND=" and ("install" or "remove"):
severity = INFO # package system modification
On each trigger: 1. Write to DB with unique fingerprint (SEC|server|hash) 2. Send Teams notification 3. api.enqueue_ai_task() β async AI analysis appended to the incident
Cache Key Schema¶
Unique keys allow multiple simultaneous incidents per server and enable auto-healing:
| Detector | Key format | Example |
|---|---|---|
| capacity | DISK_FULL\|server\|mount | DISK_FULL\|proxmox01\|/data |
| services | SERVICE_FAILED\|server\|svc | SERVICE_FAILED\|node01\|nginx.service |
| availability | HOST_DOWN\|server | HOST_DOWN\|node-03 |
| security | F2B_ACTIVE\|server | F2B_ACTIVE\|web01 |
| temperature | TEMP_HIGH\|server | TEMP_HIGH\|node02 |
| storage | STORAGE_DEGRADED\|server | STORAGE_DEGRADED\|nas01 |
| audit | CVE_HIGH\|server\|cve-id | CVE_HIGH\|proxmox01\|CVE-2026-1234 |
Same key = update existing incident. Different key = new independent incident card.
Pattern Editor (Sentinel Web UI)¶
Custom detection patterns can be added without modifying Python code:
- Open Settings β Pattern Editor
- Write a regex pattern against the log source
- Set severity and channel
- Use the regex tester to validate against sample log lines
- Save β plugin hot-reload applies immediately (no restart)
Testing Without Live Sentinel¶
The repository includes a standalone test harness:
Tests cover parsing edge cases (multi-host log blocks, malformed lines, auto-heal transitions) without requiring a running Sentinel instance.