chaos-impact
Synthesize an Azure Monitor impact report for a Chaos Studio v2 ScenarioRun: pulls the run, walks targeted resources, queries metrics/logs/activity-log/alerts over the run window ± buffer, and renders a Markdown + JSON impact card.
- License 许可
- MIT
- 最近更新
- 2026-10-28
- Stars
- ★ 3
- Forks
- 4
01 前言 Front Matter
- name
- chaos-impact
- description
- Synthesize an Azure Monitor impact report for a Chaos Studio v2 ScenarioRun: pulls the run, walks targeted resources, queries metrics/logs/activity-log/alerts over the run window ± buffer, and renders a Markdown + JSON impact card.
02 资源文件 167
- 参考文档architecture.md1007 B
- 参考文档catalog-entry.json1.6 KB
- 参考文档copilot-studio/agent.sync.yaml174 B
- 参考文档copilot-studio/behaviors/aibast_emergency-options.mcs.yml1.1 KB
- 参考文档copilot-studio/behaviors/aibast_incident-report.mcs.yml1.1 KB
- 参考文档copilot-studio/behaviors/aibast_incident-summary.mcs.yml1.1 KB
- 参考文档copilot-studio/behaviors/aibast_recovery-plan.mcs.yml1.1 KB
- 参考文档copilot-studio/behaviors/aibast_root-cause-analysis.mcs.yml1.3 KB
- 参考文档copilot-studio/behaviors/aibast_supply-chain-disruption-alert-disruption-dashboard.mcs.yml1.1 KB
- 参考文档copilot-studio/behaviors/aibast_supply-chain-disruption-alert-mitigation-plan.mcs.yml1.1 KB
- 参考文档copilot-studio/behaviors/aibast_supply-chain-disruption-alert-risk-assessment.mcs.yml1.0 KB
- 参考文档copilot-studio/behaviors/aibast_supply-chain-disruption-alert-supplier-alternatives.mcs.yml1.1 KB
- 参考文档copilot-studio/behaviors/aibast_transfer-plan.mcs.yml1.1 KB
- 参考文档copilot-studio/capabilities/knowledge/files/supply-chain-disruption-alert-rules-and-controls.md20.6 KB
- 参考文档copilot-studio/capabilities/knowledge/files/supply-chain-disruption-alert-rules-and-controls.md.mcs.yml206 B
- 参考文档copilot-studio/capabilities/knowledge/files/supply-chain-disruption-alert-synthetic-records.md17.5 KB
- 参考文档copilot-studio/capabilities/knowledge/files/supply-chain-disruption-alert-synthetic-records.md.mcs.yml204 B
- 参考文档copilot-studio/settings.mcs.yml5.2 KB
- 参考文档deployment.json4.0 KB
- 参考文档EASY-MODE-COPILOT-CHAT.md249 B
- 参考文档EASY-MODE-PERSONLESS.md249 B
- 参考文档EASY-MODE.md2.7 KB
- 参考文档evals/copilot-studio-preview-evidence.json3.1 KB
- 参考文档evals/dataverse-draft-evidence.json1.7 KB
- 参考文档evals/manual-build-evidence.json5.5 KB
- 参考文档evals/onepager-map.json5.4 KB
- 参考文档evals/source-audit.json4.6 KB
- 参考文档evals/transcripts.json25.5 KB
- 参考文档evals/visual-checkpoints.json44.0 KB
- 参考文档evidence-report.html37.0 KB
- 参考文档export-manifest.json77.0 KB
- 参考文档exports/README.md1.6 KB
- 资产文件exports/supply-chain-disruption-alert-copilot-studio-solution.zip31.9 KB
- 参考文档exports/supply-chain-disruption-alert-deployment-settings.json210 B
- 参考文档exports/supply-chain-disruption-alert-solution-export.json1.1 KB
- 参考文档field-guide.html39.5 KB
- 参考文档FIELD-GUIDE.md14.8 KB
- 参考文档FLOW.md1.5 KB
- 参考文档manual-tutorial.html116.1 KB
- 参考文档manual/GLOBAL-INSTRUCTIONS.md4.3 KB
- 参考文档manual/knowledge/supply-chain-disruption-alert-rules-and-controls.md20.6 KB
- 参考文档manual/knowledge/supply-chain-disruption-alert-synthetic-records.md17.5 KB
- 参考文档quest.html180.7 KB
- 参考文档README.md3.2 KB
- 参考文档schema/impact-report.schema.json4.2 KB
- 资产文件screenshots/assisted/01-review-build.jpg129.7 KB
- 资产文件screenshots/assisted/02-supply_chain_disruption_alert-01.jpg121.4 KB
- 资产文件screenshots/assisted/03-supply_chain_disruption_alert-02.jpg158.5 KB
- 资产文件screenshots/assisted/04-supply_chain_disruption_alert-03.jpg173.1 KB
- 资产文件screenshots/assisted/05-supply_chain_disruption_alert-04.jpg139.7 KB
- 资产文件screenshots/assisted/06-supply_chain_disruption_alert-05.jpg148.9 KB
- 资产文件screenshots/assisted/07-supply_chain_disruption_alert-06.jpg125.0 KB
- 资产文件screenshots/assisted/08-supply_chain_disruption_alert-07.jpg133.8 KB
- 资产文件screenshots/assisted/09-supply_chain_disruption_alert-08.jpg134.8 KB
- 资产文件screenshots/assisted/10-supply_chain_disruption_alert-09.jpg130.5 KB
- 资产文件screenshots/assisted/11-supply_chain_disruption_alert-10.jpg133.0 KB
- 资产文件screenshots/assisted/12-confirm-draft.jpg28.0 KB
- 资产文件screenshots/assisted/annotated/01-review-build.png128.7 KB
- 资产文件screenshots/assisted/annotated/02-supply_chain_disruption_alert-01.png124.5 KB
- 资产文件screenshots/assisted/annotated/03-supply_chain_disruption_alert-02.png162.1 KB
- 资产文件screenshots/assisted/annotated/04-supply_chain_disruption_alert-03.png178.0 KB
- 资产文件screenshots/assisted/annotated/05-supply_chain_disruption_alert-04.png142.1 KB
- 资产文件screenshots/assisted/annotated/06-supply_chain_disruption_alert-05.png150.7 KB
- 资产文件screenshots/assisted/annotated/07-supply_chain_disruption_alert-06.png124.8 KB
- 资产文件screenshots/assisted/annotated/08-supply_chain_disruption_alert-07.png136.4 KB
- 资产文件screenshots/assisted/annotated/09-supply_chain_disruption_alert-08.png133.3 KB
- 资产文件screenshots/assisted/annotated/10-supply_chain_disruption_alert-09.png129.2 KB
- 资产文件screenshots/assisted/annotated/11-supply_chain_disruption_alert-10.png131.0 KB
- 资产文件screenshots/assisted/annotated/12-confirm-draft.png28.4 KB
- 参考文档screenshots/assisted/browserfilm.json2.8 KB
- 资产文件screenshots/assisted/copilot-assisted-contact-sheet.jpg312.2 KB
- 资产文件screenshots/assisted/copilot-assisted-walkthrough.gif1.7 MB
- 参考文档screenshots/assisted/README.md468 B
- 资产文件screenshots/manual/01-create-blank-agent.jpg57.7 KB
- 资产文件screenshots/manual/02-name-agent.jpg60.3 KB
- 资产文件screenshots/manual/03-enter-instructions.jpg140.2 KB
- 资产文件screenshots/manual/04-save-instructions.jpg137.1 KB
- 资产文件screenshots/manual/05-remove-web-search.jpg140.2 KB
- 资产文件screenshots/manual/06-add-supply-chain-disruption-alert-rules-and-controls.jpg141.9 KB
- 资产文件screenshots/manual/07-add-supply-chain-disruption-alert-synthetic-records.jpg145.0 KB
- 资产文件screenshots/manual/08-add-aibast-disruption-dashboard-01.jpg150.0 KB
- 资产文件screenshots/manual/09-add-aibast-emergency-options-06.jpg151.5 KB
- 资产文件screenshots/manual/10-add-aibast-incident-report-09.jpg152.8 KB
- 资产文件screenshots/manual/11-add-aibast-incident-summary-10.jpg154.3 KB
- 资产文件screenshots/manual/12-add-aibast-mitigation-plan-03.jpg157.4 KB
- 资产文件screenshots/manual/13-add-aibast-recovery-plan-08.jpg155.8 KB
- 资产文件screenshots/manual/14-add-aibast-risk-assessment-02.jpg157.3 KB
- 资产文件screenshots/manual/15-add-aibast-root-cause-analysis-05.jpg157.5 KB
- 资产文件screenshots/manual/16-add-aibast-supplier-alternatives-04.jpg159.4 KB
- 资产文件screenshots/manual/17-add-aibast-transfer-plan-07.jpg157.5 KB
- 资产文件screenshots/manual/18-review-inventory.jpg157.5 KB
- 资产文件screenshots/manual/19-review-skills.jpg146.1 KB
- 资产文件screenshots/manual/20-review-skills-more.jpg148.8 KB
- 资产文件screenshots/manual/21-open-preview.jpg33.2 KB
- 资产文件screenshots/manual/22-supply_chain_disruption_alert-01.jpg192.6 KB
- 资产文件screenshots/manual/23-supply_chain_disruption_alert-02.jpg195.8 KB
- 资产文件screenshots/manual/24-supply_chain_disruption_alert-03.jpg206.9 KB
- 资产文件screenshots/manual/25-supply_chain_disruption_alert-04.jpg168.1 KB
- 资产文件screenshots/manual/26-supply_chain_disruption_alert-05.jpg146.7 KB
- 资产文件screenshots/manual/27-supply_chain_disruption_alert-06.jpg142.9 KB
- 资产文件screenshots/manual/28-supply_chain_disruption_alert-07.jpg146.6 KB
- 资产文件screenshots/manual/29-supply_chain_disruption_alert-08.jpg132.1 KB
- 资产文件screenshots/manual/30-supply_chain_disruption_alert-09.jpg139.4 KB
- 资产文件screenshots/manual/31-supply_chain_disruption_alert-10.jpg126.5 KB
- 资产文件screenshots/manual/32-confirm-draft.jpg29.2 KB
- 资产文件screenshots/manual/annotated/01-create-blank-agent.png62.7 KB
- 资产文件screenshots/manual/annotated/02-name-agent.png65.1 KB
- 资产文件screenshots/manual/annotated/03-enter-instructions.png138.3 KB
- 资产文件screenshots/manual/annotated/04-save-instructions.png130.1 KB
- 资产文件screenshots/manual/annotated/05-remove-web-search.png139.1 KB
- 资产文件screenshots/manual/annotated/06-add-supply-chain-disruption-alert-rules-and-controls.png141.4 KB
- 资产文件screenshots/manual/annotated/07-add-supply-chain-disruption-alert-synthetic-records.png143.7 KB
- 资产文件screenshots/manual/annotated/08-add-aibast-disruption-dashboard-01.png147.1 KB
- 资产文件screenshots/manual/annotated/09-add-aibast-emergency-options-06.png147.8 KB
- 资产文件screenshots/manual/annotated/10-add-aibast-incident-report-09.png148.7 KB
- 资产文件screenshots/manual/annotated/11-add-aibast-incident-summary-10.png150.1 KB
- 资产文件screenshots/manual/annotated/12-add-aibast-mitigation-plan-03.png153.0 KB
- 资产文件screenshots/manual/annotated/13-add-aibast-recovery-plan-08.png151.2 KB
- 资产文件screenshots/manual/annotated/14-add-aibast-risk-assessment-02.png153.1 KB
- 资产文件screenshots/manual/annotated/15-add-aibast-root-cause-analysis-05.png152.9 KB
- 资产文件screenshots/manual/annotated/16-add-aibast-supplier-alternatives-04.png154.7 KB
- 资产文件screenshots/manual/annotated/17-add-aibast-transfer-plan-07.png152.6 KB
- 资产文件screenshots/manual/annotated/18-review-inventory.png156.7 KB
- 资产文件screenshots/manual/annotated/19-review-skills.png156.6 KB
- 资产文件screenshots/manual/annotated/20-review-skills-more.png164.3 KB
- 资产文件screenshots/manual/annotated/21-open-preview.png33.1 KB
- 资产文件screenshots/manual/annotated/22-supply_chain_disruption_alert-01.png192.9 KB
- 资产文件screenshots/manual/annotated/23-supply_chain_disruption_alert-02.png199.7 KB
- 资产文件screenshots/manual/annotated/24-supply_chain_disruption_alert-03.png215.8 KB
- 资产文件screenshots/manual/annotated/25-supply_chain_disruption_alert-04.png175.1 KB
- 资产文件screenshots/manual/annotated/26-supply_chain_disruption_alert-05.png150.5 KB
- 资产文件screenshots/manual/annotated/27-supply_chain_disruption_alert-06.png148.5 KB
- 资产文件screenshots/manual/annotated/28-supply_chain_disruption_alert-07.png150.9 KB
- 资产文件screenshots/manual/annotated/29-supply_chain_disruption_alert-08.png138.6 KB
- 资产文件screenshots/manual/annotated/30-supply_chain_disruption_alert-09.png144.3 KB
- 资产文件screenshots/manual/annotated/31-supply_chain_disruption_alert-10.png134.7 KB
- 资产文件screenshots/manual/annotated/32-confirm-draft.png30.1 KB
- 参考文档screenshots/manual/browserfilm.json6.0 KB
- 资产文件screenshots/manual/manual-build-contact-sheet.jpg1.2 MB
- 资产文件screenshots/manual/manual-build-walkthrough.gif7.7 MB
- 参考文档screenshots/manual/README.md461 B
- 参考文档screenshots/README.md522 B
- 脚本scripts/Build-ImpactCorrelation.ps124.8 KB
- 脚本scripts/Constants.ps13.6 KB
- 脚本scripts/Get-DiagnosticSettings.ps15.6 KB
- 脚本scripts/Get-MonitorSignals.ps122.8 KB
- 脚本scripts/Invoke-ChaosImpact.ps117.0 KB
- 脚本scripts/New-ImpactReport.ps119.5 KB
- 其他templates/kql/azure-metrics.kql241 B
- 其他templates/kql/error-spike.kql725 B
- 其他templates/kql/resource-logs.kql280 B
- 参考文档templates/metrics/defaults.json1.7 KB
- 其他templates/report.md.tmpl2.1 KB
- 脚本tests/Build-ImpactCorrelation.Tests.ps122.7 KB
- 参考文档tests/e2e/expected-impact.json1.2 KB
- 脚本tests/e2e/OfflineReplayE2E.Tests.ps11.5 KB
- 参考文档tests/e2e/recorded-activity.json734 B
- 参考文档tests/e2e/recorded-alerts.json16 B
- 参考文档tests/e2e/recorded-diag-settings.json1001 B
- 参考文档tests/e2e/recorded-health.json16 B
- 参考文档tests/e2e/recorded-metrics.json1.2 KB
- 参考文档tests/e2e/recorded-run.json822 B
- 参考文档tests/e2e/recorded-workspace-check.json300 B
- 脚本tests/e2e/Run-OfflineReplay.ps114.0 KB
- 脚本tests/Get-MonitorSignals.Tests.ps112.3 KB
- 脚本tests/Invoke-ChaosImpact.Tests.ps123.7 KB
- 脚本tests/New-ImpactReport.Tests.ps116.3 KB
03 SKILL.md 正文
ChaosImpact — Post-Run Azure Monitor Synthesis
⛔ ABSOLUTE RULE: Do NOT improvise, skip, or substitute any step. On ANY error, STOP and wait for the user.
When to use this skill (vs. the MCP server)
This skill is the human-interactive path: it resolves run context from the
shared startchaos-state.json, prompts for missing inputs via exit codes, and
renders a Markdown card plus a JSON sidecar. Use it when there is a user in the
loop — typically right after /start-chaos (or as a post-step of it).
If you are an autonomous agent with no user to prompt, call the three
Monitor tools on the chaos-studio MCP server directly (monitor_query_metrics,
monitor_query_logs, monitor_search_activity_log) and assemble your own
report. The PowerShell skill and the MCP tools are two independent surfaces
over the same Azure endpoints — neither calls the other.
Both surfaces target Microsoft.Chaos 2026-05-01-preview plus the pinned
Azure Monitor API versions in scripts/Constants.ps1, and use the local
az login session for auth.
How It Works
All synthesis logic lives in scripts/Invoke-ChaosImpact.ps1. The script
resolves the ScenarioRun, discovers Log Analytics workspaces via diagnostic
settings, runs the Monitor query fan-out, classifies signals, and writes both
artifacts.
The AI orchestrator's only job is:
- Set
$env:STARTCHAOS_STATE_PATHto${SESSION_DIR}/startchaos-state.json(the skill reads but does not write this file). - Run the script with
-ScenarioRunId <id>(positional accepted). - Handle exit codes that require user input (see below).
- Re-run the script with the user's answers as parameters.
Running the Script
$env:STARTCHAOS_STATE_PATH = "<session-dir>/startchaos-state.json"
& "<skill-dir>/scripts/Invoke-ChaosImpact.ps1" -ScenarioRunId <runId> @extraArgs
When invoked standalone (no prior start-chaos state file), the orchestrator
must supply -SubscriptionId, -ResourceGroup, -WorkspaceName, and
-ScenarioName — otherwise the script exits 2.
Exit Codes → AI Actions
| Exit | Meaning | AI Action |
|---|---|---|
| 0 | Report generated | Done — print the Markdown card from script output. |
| 1 | Hard error | STOP. Render the error from script output. Wait for user. |
| 2 | Missing run context | ask_user for any of: -SubscriptionId, -ResourceGroup, -WorkspaceName, -ScenarioName, -ScenarioRunId. Re-run with the supplied parameters. |
| 3 | Log Analytics workspace not discoverable for ≥ 1 resource, AND -LogAnalyticsWorkspaceId not supplied |
ask_user whether to (a) supply a workspace ID (re-run with -LogAnalyticsWorkspaceId <id>) or (b) proceed without log signals (re-run with -LogAnalyticsWorkspaceId none). |
| 4 | Permission gap (caller lacks Monitoring Reader on one or more target resource groups) (Epic 3 — not yet implemented) |
ask_user to confirm best-effort partial report (re-run with -AllowPartial) or abort. |
Script Parameters
| Parameter | Description |
|---|---|
-ScenarioRunId |
Required (positional). The ScenarioRun resource name. |
-SubscriptionId / -ResourceGroup / -WorkspaceName / -ScenarioName |
Run context. Read from startchaos-state.json when omitted; required otherwise. |
-Buffer |
ISO-8601 duration added before/after the run window. Default PT5M. |
-LogAnalyticsWorkspaceId |
Optional override when diag-settings discovery fails for some resources. Pass none to explicitly skip log signals. |
-MaxResources |
Per-run resource cap. Default 50. Instance-level targets (VMSS / AKS) are collapsed to parent before counting. |
-OutputDir |
Where to drop artifacts. Default $env:STARTCHAOS_SESSION_DIR or current directory. |
-IncludeBaseline |
When set, also computes baseline samples (the -Buffer × 2 window before run start). Default on. |
-Format |
markdown, json, or both. Default both. |
-AllowPartial |
Continue past permission gaps and emit a partial report. (Epic 3 — not yet implemented; currently accepted but has no effect.) |
What the Script Handles (no AI logic needed)
- Run resolution and targeted-resource flattening (collapses instance-level → parent)
MaxResourcescap with explicit coverage caveats- Diagnostic-settings discovery + per-resource workspace caching
- Azure Monitor metrics / Log Analytics / Activity Log / Alerts / Service Health fan-out
- Baseline subtraction and signal classification
- Markdown report card + JSON sidecar artifact
- All error cards with remediation commands
04 同仓库更多 Skills
start-chaos
Orchestrate the full Chaos Studio v2 workflow: auth → workspace → scenario → run. Shares a single state file and supports resume.
setup-scenario
Discover recommended scenarios, build and validate a ScenarioConfiguration, and auto-fix resource permissions.
run-scenario
Execute a ScenarioConfiguration and stream ScenarioRun status with per-action breakdown until terminal state.
create-workspace
Provision a Microsoft.Chaos/workspaces resource (v2), bind a managed identity, set scopes, and grant Reader RBAC on the scope.
chaos-study
Guided help for running a Chaos Studio study against an Azure workspace scope: frame a steady-state question with you, discover live which actions Chaos Studio offers for that region, freeze a plan, run a validated scenario configuration only with your explicit consent, collect the before/during/after signals you chose, and write a self-contained HTML report for your review. Start here for questions like 'what happens to my service when X?' or 'is my service resilient to X?'.
chaos-study-scope
Frame a Chaos study before anything runs: resolve or create a Chaos Studio V2 workspace, read the resources the service discovered inside its scopes, discover live which actions and scenarios are available for that region, express a falsifiable steady-state predicate, verify the action fits what is in scope, then freeze and hash the study plan.