ワンクリックで
triage
Triage a homelab service: resolve prod hosts and units, gather diagnostic state, summarize.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Triage a homelab service: resolve prod hosts and units, gather diagnostic state, summarize.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
| name | triage |
| description | Triage a homelab service: resolve prod hosts and units, gather diagnostic state, summarize. |
Triage homelab service $ARGUMENTS on prod. Empty input means ask for a service; whitespace means reject the invocation. Diagnostics are pre-authorized, but prod mutations still need explicit operator ack.
roles/$ARGUMENTS/. If missing, report no-such-role plus the
three nearest roles/ matches.- $ARGUMENTS in site.yml, take each enclosing play's hosts:
pattern, expand with ansible-inventory -i hosts.ini --list --limit, and
intersect with [prod] from hosts.ini. Skip localhost.templates/ and files/
*.{service,timer,socket}{,.j2}, systemd_unit_args.src, and bare
systemd: or service: tasks. Strip .j2 for on-host names.foo@.service, enumerate live instances with
systemctl list-units 'foo@*' --no-legend --plain.--name from systemctl cat <unit>.
Substitute %i for instances; do not assume unit name equals container name.Run one batched Bash command and parallelize per host/unit. Prefix each ssh with
-o ConnectTimeout=5 -o BatchMode=yes so one dead host does not stall the
report.
For each host/unit, run the remote service commands with sudo:
sudo systemctl show -p ActiveState,SubState,Result,UnitFileState,ActiveEnterTimestamp,NRestarts --value <unit>sudo journalctl -u <unit> --since=-24h -p warning -o short-iso --no-pager | tail -40sudo journalctl -u <unit> --since=-24h -o short-iso --no-pager | grep -E 'Main process exited|repeated too quickly|segfault|oom-kill|Failed with result|Killed process' | tail -10sudo podman inspect <ct> --format '{{json .State}}'; if unhealthy,
run sudo podman healthcheck run <ct> and capture exit 0/1/125. If there is
no healthcheck, report Healthcheck: n/a.curl -sS --max-time 5 'http://netdata.<h>.fahm.fr/api/v1/alarms?active=true';
filter to systemd_service* for the unit.Once locally:
git log --since=30.days.ago --format='%h %cr %s' -- roles/$ARGUMENTS/ host_vars/<h>.yml group_vars/all/git log origin/master..HEAD -- roles/$ARGUMENTS/ is
non-empty.Skip non-applicable checks cleanly.
Start with one TL;DR sentence: healthy, degraded, or broken, plus the most load-bearing evidence.
Then report each host/unit in order, omitting empty sections:
Keep the normal report around 80 lines. When noisy, collapse errors/alerts to counts and top phrases so the operator can choose the next drill-down.