Auto-incident detector:
- New app/tasks/incident_detector.py: post-glean error cluster detector
- Sliding window algorithm: source + N errors within window_s seconds
- Deduplication via issue_type='auto:{source_id}' + interval overlap check
- Respects TURNSTONE_AUTO_INCIDENT_THRESHOLD (default 5) and
TURNSTONE_AUTO_INCIDENT_WINDOW (default 600s) env vars
- 20 tests all passing
- Wired into glean_scheduler.run_once() and scheduler_loop()
- TURNSTONE_AUTO_INCIDENT env var to disable (default enabled)
Podman standalone improvements:
- REPO_DIR auto-detected from script location (no longer hardcoded to /opt/turnstone)
- DATA_DIR/PATTERNS_DIR/HF_CACHE_DIR configurable via env vars
- Bootstrap step copies host-specific sources-<hostname>.yaml on first run
- Auto-incident env vars passed through
example-node sources:
- patterns/sources-example-node.yaml: Sonarr, Radarr, Bazarr, Prowlarr,
Tautulli, autoscan, organizr, nextcloud, journal export
49 lines
2.2 KiB
YAML
49 lines
2.2 KiB
YAML
# Turnstone log sources — example-node.tv
|
|
#
|
|
# Container paths: /opt and /var/log are bind-mounted read-only.
|
|
# journal-export.jsonl is written to /data/ by export_journal.sh (run via cron before glean).
|
|
#
|
|
# Add or remove sources freely. Missing paths are skipped with a warning.
|
|
|
|
sources:
|
|
# ── System ────────────────────────────────────────────────────────────────
|
|
# Requires: cron job to run export_journal.sh before each glean.
|
|
# Example cron (every 15 min, run as x, add via: crontab -e):
|
|
# */15 * * * * /Library/Development/CircuitForge/turnstone/scripts/export_journal.sh \
|
|
# /opt/turnstone-data/
|
|
- id: system-journal
|
|
path: /data/journal-export.jsonl
|
|
|
|
- id: dmesg
|
|
path: /data/dmesg-export.txt
|
|
|
|
# ── Servarr stack ─────────────────────────────────────────────────────────
|
|
- id: sonarr
|
|
path: /opt/sonarr/config/logs/sonarr.0.txt
|
|
|
|
- id: radarr
|
|
path: /opt/radarr/config/logs/radarr.0.txt
|
|
|
|
- id: bazarr
|
|
path: /opt/bazarr/config/log/bazarr.log
|
|
|
|
- id: prowlarr
|
|
path: /opt/prowlarr/config/logs/prowlarr.0.txt
|
|
|
|
# ── Media server / tracking ────────────────────────────────────────────────
|
|
- id: tautulli
|
|
path: /opt/tautulli/config/logs/plex_websocket.log
|
|
|
|
# ── Download automation ────────────────────────────────────────────────────
|
|
- id: autoscan
|
|
path: /opt/autoscan/config/autoscan.log
|
|
|
|
# ── Web / proxy ────────────────────────────────────────────────────────────
|
|
- id: organizr-nginx
|
|
path: /opt/organizr/log/nginx/error.log
|
|
|
|
- id: organizr-app
|
|
path: /opt/organizr/www/organizr/server.log
|
|
|
|
- id: nextcloud-nginx
|
|
path: /opt/nextcloud/config/log/nginx/error.log
|