longhorn-health
Longhorn の健全性チェック — volume robustness(degraded 検出)、node 容量、R2 バックアップの鮮度、recurring job の動作状況を一括診断
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Longhorn の健全性チェック — volume robustness(degraded 検出)、node 容量、R2 バックアップの鮮度、recurring job の動作状況を一括診断
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Scaffold a new infrastructure component, choosing the right layout (Helm multi-source / raw YAML / ApplicationSet) for its category
Create a new Sealed Secret — generates raw secret, seals it with kubeseal, and places it in the correct resources/ directory
Troubleshoot a specific infrastructure component — resolve namespace, check pods, events, logs, and Argo CD sync status
全 Helm Application の chart バージョン鮮度を一括チェック — 各 app.yaml の targetRevision を upstream 最新と突き合わせ、更新候補を優先度付きでレポート(/helm-upgrade の前段)
Secret 管理 4 方式(Vault dynamic / Vault static via ESO / Vault Transit / SealedSecret)の健全性を一括チェック — Vault seal 状態、ESO 同期、SealedSecret 復号、関連 cert をまとめて診断
OpenAI Codex に作業を委譲する。コードレビュー、セカンドオピニオン、別解の生成、調査・分析を Codex にやらせたいとき(「Codex にレビューさせて」「Codex に聞いて」「Codex の意見も欲しい」等)に使う。
| name | longhorn-health |
| description | Longhorn の健全性チェック — volume robustness(degraded 検出)、node 容量、R2 バックアップの鮮度、recurring job の動作状況を一括診断 |
| argument-hint | null |
replicated storage と R2 バックアップ(s3://kensan-lab-longhorn-backup@auto/、weekly backup + daily snapshot + monthly backup の RecurringJob 構成)の状態を横断確認する。read-only。
コントロールプレーン(manager / engine pods):
kubectl get pods -n longhorn-system --field-selector=status.phase!=Running,status.phase!=Succeeded
Volume robustness(最重要):
kubectl get volumes.longhorn.io -n longhorn-system -o custom-columns='NAME:.metadata.name,STATE:.status.state,ROBUSTNESS:.status.robustness,NODE:.status.currentNodeID,SIZE:.spec.size,PVC:.status.kubernetesStatus.pvcName,NS:.status.kubernetesStatus.namespace'
degraded = replica 欠け(ノード障害や容量不足で再構築が止まっている可能性)→ ❌ で報告faulted = データアクセス不能 → 最優先で報告Node 容量とスケジューラビリティ:
kubectl get nodes.longhorn.io -n longhorn-system -o custom-columns='NAME:.metadata.name,READY:.status.conditions[?(@.type=="Ready")].status,SCHEDULABLE:.status.conditions[?(@.type=="Schedulable")].status'
# disk 名つきで列挙(複数 disk ノードでも対応付けが崩れない)。map の key-value 走査が必要なので go-template を使う(jsonpath は不可)
kubectl get nodes.longhorn.io -n longhorn-system -o go-template='{{range .items}}{{.metadata.name}}:{{range $d,$s := .status.diskStatus}}{{"\n "}}{{$d}} available={{$s.storageAvailable}} scheduled={{$s.storageScheduled}}{{end}}{{"\n"}}{{end}}'
バックアップターゲット(R2)の疎通:
kubectl get backuptargets.longhorn.io -n longhorn-system -o custom-columns='NAME:.metadata.name,AVAILABLE:.status.available,LAST-SYNC:.status.lastSyncedAt'
available: false なら credential(longhorn-r2-backup SealedSecret)か R2 側を疑う → /secret-health への導線バックアップ鮮度:
kubectl get backupvolumes.longhorn.io -n longhorn-system -o custom-columns='NAME:.metadata.name,LAST-BACKUP:.status.lastBackupName,AT:.status.lastBackupAt'
kubernetes/storage/longhorn/resources/recurring-jobs.yaml)kubectl get volumes.longhorn.io <name> -n longhorn-system -o jsonpath='{.metadata.creationTimestamp}{" group="}{.metadata.labels.recurring-job-group\.longhorn\.io/default}{"\n"}'
group=enabled が出れば default group 加入済み(label の値は group 名ではなく enabled)RecurringJob の存在確認:
kubectl get recurringjobs.longhorn.io -n longhorn-system
Summary:
/troubleshoot longhorn への導線を示すlonghorn_volume_robustness / longhorn_backup_state メトリクスで時系列の劣化傾向も補足できる(ServiceMonitor 設定済み、storage-plan §5.9)