Use this when an automated runbook fails or stops at a precondition.
Runbook Troubleshooting
Troubleshoot runbook automation by checking the execution log, inputs supplied, node connectivity and credentials, preconditions that blocked execution and changes in the target since the runbook was written.
1. Failures: credentials expired, targets changed, precondition failures, timeouts.
2. Read step logs.
3. Check credentials store.
4. Reproduce in test.
5. Fix and add a test.
runbook → step → error → fix
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
git diff --checkPrimary Commands
Configuration and operational commands for this Topic.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Command read-back and what it shows Verify boundary
Known-good is the intended runbook revision is clean, required steps progress to completed in the expected order, postconditions match and the original operational objective is satisfied; broken state is source errors, blocked/failed steps, unexpected skips/retries or a nominally completed run with failed postcondition/rollback state. git diff --check shows whitespace correctness in the runbook source diff only, but it does not show procedure semantics, runtime execution or target recovery.
Step 2 Common mistakes Narrow the fault
- Not keeping the runbook execution log.
Step 3 Observation-driven branch and next-check logic Narrow the fault
If git diff --check reports source errors, fix the runbook change before execution; if source is clean but orchestration stops, inspect first failed/blocked step and inputs; if steps complete but target state is wrong, compare postconditions and rollback/read-back instead of rerunning blindly.
- Read the execution log first.
- Check inputs and targets.
- Check preconditions that blocked execution.
- Failed run logs — cause
- Target reachability/credentials — common failures
- Recent changes to runbook — regressions
ReferenceHow it works1 section · depth on demand
How it works
Runbook Troubleshooting is governed by runbook source revision, orchestration step state, operator/credential context and each target system action. A runbook translates a versioned procedure into ordered or conditional steps, persisting progress/retry/rollback state while invoking heterogeneous tools; source correctness and execution state are separate authorities. Source control, approvals, credentials, target APIs, idempotency and rollback artifacts are independent things to check. The important state separation is that clean source formatting does not mean step ordering or runtime conditions are correct, and a completed step does not show later steps or rollback succeeded.
ReferenceImportant terms & boundaries1 section · depth on demand
Method
Troubleshooting runbook automation means finding why a runbook did not achieve its goal: it did not start, a step failed, it ran against the wrong target, or it reported success while the problem remained.
Method:
1. Confirm the trigger fired and with which inputs (alert payload, user parameters).
2. Find the failing step in the job log and its exact error.
3. Check target-side evidence (service status, device logs) — the step may have worked but verification failed, or vice versa.
4. Check credentials and connectivity from the runner to the target.
5. Re-run in dry-run/diagnostic mode against the single target.
Update the runbook after each fix: add the failure to the "common failures" section and, if it can be detected, a precondition check that fails clearly next time.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Runbook Automation > Runbook Troubleshooting. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://learn.microsoft.com/en-us/azure/automation/automation-runbook-types · confidence 94%