Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions skills/flashduty/reference/monit-agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ Run up to 8 monit-agent tools concurrently on a target
- **`ambiguous_target_kind` error** ⇒ the locator matched multiple kinds; re-issue with `--target-kind`.
- A `target_unavailable` / `target_unreachable` error means the agent isn't connected — report it; don't retry endlessly or fall back to SSH.
- Per-tool errors (`timeout`, `denied`, `unknown_tool`…) are reported per result, mutually exclusive with that tool's `data`.
- **Serialize per target; parallelize only across targets.** Each target enforces a per-target concurrency limit, so two `invoke`/`catalog` calls fired at the *same* locator at once make the second come back `code=overloaded` — forcing a context-bloating retry. Batch every tool for one host into a single `invoke` (its `tools` array already runs them concurrently agent-side); fan out in parallel across *distinct* targets, never against one.

## Worked example — top processes + disk on a host

Expand Down
14 changes: 10 additions & 4 deletions skills/flashduty/scripts/incident-summary.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
#
# usage: bash incident-summary.sh <incident-id>
#
# To tie post-mortems to this incident specifically, re-run the last section with the
# channel_id from "incident detail": fduty incident post-mortem-list --channel-ids <id>
# Section ⑥ lists recent post-mortems account-wide. To scope them to THIS incident's
# channel, read its channel_id (fduty incident info --incident-id <id> --output-format
# toon | grep '^channel_id:') and re-run: fduty incident post-mortem-list --channel-ids <id>
#
# Note: errexit (-e) is intentionally NOT set — every section must run even if one
# command fails, so the summary stays as complete as possible. Each command's own
Expand All @@ -21,9 +22,14 @@ if [ -z "$ID" ]; then
exit 2
fi

run() { echo "===== fduty $* ====="; fduty "$@" --output-format toon 2>&1; echo; }
# Print each command's DEFAULT renderer (a curated table/summary that projects the
# summary-relevant fields), NOT --output-format toon: toon dumps the full raw objects
# — every empty field plus heavy blobs like a change's labels.steps — which overflowed
# the output cap and forced repeated paging. For these read verbs the lean default IS
# the field projection a fault summary needs (id/severity/status/title/channel/times/…).
run() { echo "===== fduty $* ====="; fduty "$@" 2>&1; echo; }

run incident detail "$ID" # ① 详情 + AI summary + alert counts + channel_id
run incident detail "$ID" # ① 详情 + AI summary + alert counts + channel
run incident alerts "$ID" # ② contributing alerts
run incident timeline "$ID" # ④ timeline
run incident similar "$ID" --limit 5 # ⑤ similar past incidents (channel-backed)
Expand Down
Loading