openclaw-self-healing は何をしますか?
OpenClaw Gateway向けの4段階自律自己修復システム。永続的な学習、推論ログ、マルチチャネルアラートを備え、Claude Codeをレベル3の緊急医師として活用したAI駆動の診断と修復を実現します。
概要
このスキルは、OpenClaw Gateway上で動作する4段階(Tier 1〜4)の自律自己修復システムです。各ティアは異なる重大度の問題を処理し、システム全体の可用性を向上させます。
- Tier 1: 軽微なエラーや警告の自動修復
- Tier 2: 一般的な障害の診断と修復
- Tier 3: Claude Codeによる高度なAI診断と修復(緊急医師モード)
- Tier 4: 管理者へのアラート通知と手動介入の推奨
特徴
- 永続的な学習機能: 過去の修復結果を学習し、将来の診断精度を向上
- 推論ログ: 全ての診断と修復のログを詳細に記録
- マルチチャネルアラート: Slack、メール、Webhookなど複数の通知チャネルをサポート
- Claude Code連携: 複雑な問題に対してAIによる高度な診断と修復を実行
セットアップ
# リポジトリのクローン
git clone https://github.com/ramsbaby/openclaw-self-healing.git
cd openclaw-self-healing
# 設定ファイルの編集
cp config.example.yaml config.yaml
# config.yaml を編集して環境に合わせて設定
# スキルの有効化
openclaw skill enable ramsbaby/openclaw-self-healing
設定
config.yaml で以下の設定が可能です:
# 自己修復の設定
self_healing:
enabled: true
tiers:
1:
enabled: true
actions: ["restart_service", "clear_cache"]
2:
enabled: true
actions: ["rollback", "scale_up"]
3:
enabled: true
doctor: "claude-code"
model: "claude-3-opus"
4:
enabled: true
alert_channels: ["slack", "email"]
# 学習設定
learning:
path: "/var/lib/openclaw/learning"
retention_days: 90
# ログ設定
logging:
path: "/var/log/openclaw/reasoning.log"
level: "info"
使用方法
# 自己修復システムの起動
openclaw self-healing start
# 状態の確認
openclaw self-healing status
# 学習データの表示
openclaw self-healing learning show
# 推論ログの表示
openclaw self-healing logs
アラート設定
マルチチャネルアラートの設定例:
alerts:
slack:
webhook_url: "https://hooks.slack.com/services/xxx"
channel: "#alerts"
email:
smtp_server: "smtp.example.com"
to: "[email protected]"
webhook:
url: "https://example.com/webhook"
ライセンス
MIT