How arfin-parween/the_night_owl works
NightOwl is an AI on-call engineer for a Spark ETL pipeline. The workflow runs or simulates a failure, records run and service evidence in OpenSearch, detects failed runs and wakes OpenClaw, then investigates through read-only CLI tools. The agent proposes an incident; a human approval is required before guarded config remediation, rerun, MTTR measurement and postmortem storage. README documents schema diff, change correlation, upstream logs, hybrid incident search and lineage impact. Some unsampled setup and tool internals are represented at their exact directory paths.
Main entry points: cli.py NightOwl CLI · os_client.py OpenSearch Client · watcher.py Failure Watcher · fixes.py Guarded Fixes
Components 18
Operations
- NightOwl CLI
nightowl/cli.py - Runtime Settings
nightowl/settings.py - OpenSearch Setup
nightowl/setup_os.py - Failure Watcher
nightowl/watcher.py
ETL and Evidence
- Failure Scenarios
nightowl/scenarios.py - Synthetic Data
nightowl/datagen.py - Spark ETL
nightowl/pipeline.py - Structured Events
nightowl/eventlog.py
Investigation
- Seeded Memory
nightowl/seed_data.py - OpenSearch Client
nightowl/os_client.py - Investigation Tools
nightowl/tools.py
Remediation
- Guarded Fixes
nightowl/fixes.py - Pipeline Config
config/pipeline.default.yaml
External Integrations
- OpenSearch
- OpenClaw Agent
- Telegram
Other components
- Operator
- Approver
Connections 26
- Operator → NightOwl CLI: invokes
README.md - NightOwl CLI → Spark ETL: runs
nightowl/cli.py - NightOwl CLI → Failure Scenarios: arms
nightowl/cli.py - Failure Scenarios → Synthetic Data: writes defects
nightowl/scenarios.py - Spark ETL → Structured Events: emits events
nightowl/pipeline.py - Spark ETL → OpenSearch: records runs
README.md - Structured Events → OpenSearch Client: indexes events
nightowl/eventlog.py - OpenSearch Client → OpenSearch: queries and writes
nightowl/os_client.py - NightOwl CLI → OpenSearch Setup: sets up
nightowl/cli.py - OpenSearch Setup → OpenSearch: configures indices
nightowl/setup_os.py - OpenSearch Setup → Seeded Memory: loads history
nightowl/setup_os.py - NightOwl CLI → Failure Watcher: starts watching
nightowl/cli.py - Failure Watcher → OpenSearch Client: polls failures
nightowl/watcher.py - Failure Watcher → OpenClaw Agent: wakes agent
nightowl/watcher.py - Failure Watcher → Telegram: pings
nightowl/watcher.py - OpenClaw Agent → NightOwl CLI: executes tools
README.md - NightOwl CLI → Investigation Tools: dispatches queries
nightowl/cli.py - Investigation Tools → OpenSearch Client: queries evidence
nightowl/tools.py - Investigation Tools → OpenSearch: investigates memory and lineage
README.md - OpenClaw Agent → Telegram: reports RCA
README.md - Approver → OpenClaw Agent: approves incident
README.md - OpenClaw Agent → NightOwl CLI: requests fix
README.md - NightOwl CLI → Guarded Fixes: dispatches apply
nightowl/cli.py - Guarded Fixes → Pipeline Config: changes config
nightowl/fixes.py - Guarded Fixes → Spark ETL: reruns
nightowl/fixes.py - Guarded Fixes → OpenSearch Client: stores postmortem
nightowl/fixes.py