๋ณธ๋ฌธ์œผ๋กœ ๊ฑด๋„ˆ๋›ฐ๊ธฐ
ๅฐ้พ™่™พๅฐ้พ™่™พAI
๐Ÿค–

ops-journal

Automates logging of deployments, incidents, changes, and decisions into a searchable ops journal with incident timelines and postmortem generation.

ไธ‹่ฝฝ148
ๆ˜Ÿๆ ‡0
็‰ˆๆœฌ1.0.0
DevOps่ฟ็ปด
ๅฎ‰ๅ…จ้€š่ฟ‡
โš™๏ธ่„šๆœฌ

ๆŠ€่ƒฝ่ฏดๆ˜Ž

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 init

# Log 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 storage

# Start an incident
python3 scripts/journal.py incident open "API latency spike" --severity high

# Resolve 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 high

# Generate reports
python3 scripts/journal.py summary --period week
python3 scripts/journal.py timeline INC-001

# Export
python3 scripts/journal.py export --format markdown --since 30d

Entry Categories

CategoryDescriptionAuto-logged
deployDeployments, upgrades, rollbacksVia hooks
incidentIncidents, outages, degradationsVia watchdog integration
configConfiguration changesVia hooks
maintenanceScheduled maintenance, cleanupManual or cron
securitySecurity events, audits, patchesVia security skills
noteGeneral observations, decisionsManual

Severity Levels

  • info โ€” Normal operations (default)
  • warn โ€” Something worth noting
  • high โ€” Important event requiring attention
  • critical โ€” Major incident or outage

Commands

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

  • Human: Colored terminal output with category icons and severity highlighting
  • JSON: Machine-readable output for integration (--json)
  • Markdown: Report-ready markdown for sharing (--format markdown)
  • CSV: Spreadsheet-compatible export (--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 --json

# Weekly 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 entries
  • incidents/ โ€” Individual incident files (markdown)

Files

  • scripts/journal.py โ€” Main journal engine
  • SKILL.md โ€” This file

ๅฆ‚ไฝ•ไฝฟ็”จใ€Œops-journalใ€๏ผŸ

  1. ๆ‰“ๅผ€ๅฐ้พ™่™พAI๏ผˆWeb ๆˆ– iOS App๏ผ‰
  2. ็‚นๅ‡ปไธŠๆ–นใ€Œ็ซ‹ๅณไฝฟ็”จใ€ๆŒ‰้’ฎ๏ผŒๆˆ–ๅœจๅฏน่ฏๆก†ไธญ่พ“ๅ…ฅไปปๅŠกๆ่ฟฐ
  3. ๅฐ้พ™่™พAI ไผš่‡ชๅŠจๅŒน้…ๅนถ่ฐƒ็”จใ€Œops-journalใ€ๆŠ€่ƒฝๅฎŒๆˆไปปๅŠก
  4. ็ป“ๆžœๅณๆ—ถๅ‘ˆ็Žฐ๏ผŒๆ”ฏๆŒ็ปง็ปญๅฏน่ฏไผ˜ๅŒ–

็›ธๅ…ณๆŠ€่ƒฝ