ops-journal
by @mariusfit
Automates logging of deployments, incidents, changes, and decisions into a searchable ops journal with incident timelines and postmortem generation.
clawhub install ops-journalπ About This Skill
ops-journal β Automated Ops Logging & Incident Timeline for OpenClaw
Structured operational journal that captures deployments, incidents, changes, and decisions. Creates a searchable ops log with incident timeline reconstruction and automated postmortem generation.
Quick Start
# Initialize journal
python3 scripts/journal.py initLog an event
python3 scripts/journal.py log "Upgraded nginx to 1.25" --category deploy
python3 scripts/journal.py log "Disk cleanup, freed 5GB" --category maintenance --tags storageStart an incident
python3 scripts/journal.py incident open "API latency spike" --severity highResolve an incident
python3 scripts/journal.py incident resolve INC-001 "Root cause: disk full on /var"Search logs
python3 scripts/journal.py search "nginx" --since 7d
python3 scripts/journal.py search --category incident --severity highGenerate reports
python3 scripts/journal.py summary --period week
python3 scripts/journal.py timeline INC-001Export
python3 scripts/journal.py export --format markdown --since 30d
Entry Categories
| Category | Description | Auto-logged |
|----------|------------|-------------|
| deploy | Deployments, upgrades, rollbacks | Via hooks |
| incident | Incidents, outages, degradations | Via watchdog integration |
| config | Configuration changes | Via hooks |
| maintenance | Scheduled maintenance, cleanup | Manual or cron |
| security | Security events, audits, patches | Via security skills |
| note | General observations, decisions | Manual |
Severity Levels
info β Normal operations (default)warn β Something worth notinghigh β Important event requiring attentioncritical β Major incident or outageCommands
log β Create a journal entry
python3 scripts/journal.py log "message" [--category CAT] [--severity SEV] [--tags tag1,tag2]
incident β Incident management
python3 scripts/journal.py incident open "description" [--severity SEV]
python3 scripts/journal.py incident resolve ID "resolution"
python3 scripts/journal.py incident list [--status open|resolved|all]
python3 scripts/journal.py incident show ID
search β Search journal entries
python3 scripts/journal.py search [query] [--category CAT] [--severity SEV] [--since Nd|Nw|Nm] [--limit N]
summary β Generate period summary
python3 scripts/journal.py summary [--period day|week|month] [--json]
timeline β Incident timeline
python3 scripts/journal.py timeline ID [--format markdown|json]
export β Export journal
python3 scripts/journal.py export [--format markdown|json|csv] [--since Nd] [--output file]
stats β Journal statistics
python3 scripts/journal.py stats [--period month]
Output Modes
--json)--format markdown)--format csv)Integration with infra-watchdog
When infra-watchdog detects an issue, ops-journal can auto-log it:
# In a cron or hook:
python3 scripts/journal.py log "Monitor CRITICAL: Gateway down" --category incident --severity critical
OpenClaw Cron Integration
# Daily summary at 09:00
python3 scripts/journal.py summary --period day --jsonWeekly digest on Monday
python3 scripts/journal.py summary --period week
Storage
All data stored in ~/.openclaw/workspace/ops-journal/:
journal.db β SQLite database with all entriesincidents/ β Individual incident files (markdown)Files
scripts/journal.py β Main journal engineSKILL.md β This fileπ‘ Examples
# Initialize journal
python3 scripts/journal.py initLog an event
python3 scripts/journal.py log "Upgraded nginx to 1.25" --category deploy
python3 scripts/journal.py log "Disk cleanup, freed 5GB" --category maintenance --tags storageStart an incident
python3 scripts/journal.py incident open "API latency spike" --severity highResolve an incident
python3 scripts/journal.py incident resolve INC-001 "Root cause: disk full on /var"Search logs
python3 scripts/journal.py search "nginx" --since 7d
python3 scripts/journal.py search --category incident --severity highGenerate reports
python3 scripts/journal.py summary --period week
python3 scripts/journal.py timeline INC-001Export
python3 scripts/journal.py export --format markdown --since 30d