Extract and analyze failure events from AAP jobs to classify errors and reconstruct failure timelines. Use when: - "Job #X failed", "Why did the execution fail?" - "Analyze the failed job", "What went wrong?" - "Show me the failure details" NOT for: host fact correlation (use host-fact-inspector) or resolution recommendations (use resolution-advisor).
86%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Low
Low-risk findings worth noting
Required MCP Servers:
aap-mcp-job-management - Job details, events, host summaries, stdoutVerification: Run the aap-mcp-validator skill with aap-mcp-job-management before proceeding.
Use this skill when:
Do NOT use when:
execution-risk-analyzer + governed-job-launcher)host-fact-inspector after this skill)resolution-advisor after this skill)CRITICAL: Document consultation MUST happen BEFORE any MCP tool invocations.
Document Consultation (REQUIRED - Execute FIRST):
MCP Tool: jobs_retrieve (from aap-mcp-job-management)
Parameters:
id: "<job_id>"Extract: status, failed, job_type, elapsed, launch_type.
Per job-troubleshooting.md, the status determines the analysis path:
failed → Analyze events for runner_on_failederror → Platform-level failure (check capacity, EE, credentials)canceled → Check timeout or manual cancellationMCP Tool: jobs_job_events_list (from aap-mcp-job-management)
Parameters:
id: "<job_id>"page_size: 100Filter for failure-related events:
runner_on_failed -- task failures (PRIMARY)runner_on_unreachable -- host connectivity failures (PRIMARY)playbook_on_stats -- final summaryFrom each failure event, extract:
host: which host failedtask: which task failedevent_data.res.msg: error messageevent_data.task_action: Ansible modulecounter: sequence number for timelineMCP Tool: jobs_job_host_summaries_list (from aap-mcp-job-management)
Parameters:
id: "<job_id>"Map each host's ok, changed, failures, dark, skipped counts.
Apply the classification from job-troubleshooting.md:
| dark > 0 | failures > 0 | Classification |
|---|---|---|
| Yes | No | Platform issue: Host connectivity |
| No | Yes | Code/Config issue: Task failure |
| Yes | Yes | Mixed: Both connectivity and task issues |
For each runner_on_failed event, match against the failure patterns in job-troubleshooting.md:
Sort events by counter and produce a chronological failure narrative:
Output format (per job-troubleshooting.md template):
## Job Failure Analysis: Job #[job_id]
**Job Status**: [status]
**Elapsed Time**: [elapsed]s
**Launch Type**: [launch_type]
### Failure Timeline
1. [counter] - Task "[task_name]" on host "[hostname]": [event_type]
Error: "[error_message]"
Module: [module_name]
2. [subsequent failure events]
### Host Summary
| Host | OK | Changed | Failed | Unreachable |
|---|---|---|---|---|
| [host1] | [ok] | [changed] | [failures] | [dark] |
### Preliminary Classification
**Type**: [Platform / Code / Configuration] Issue
**Pattern Match**: [Pattern name from failure patterns reference]
**Evidence**: Per Red Hat's Troubleshooting Guide: "[relevant guidance from job-troubleshooting.md]"
**Root Cause Candidate**: [first failure event analysis]
### Next Steps
- Host fact correlation recommended: [yes/no, with affected hostnames]
- Resolution advisory recommended: [yes/no, with error pattern]aap-mcp-job-management - Job data and eventsjobs_retrieve (from job-management) - Job statusjobs_job_events_list (from job-management) - Event streamjobs_job_host_summaries_list (from job-management) - Per-host summaryjobs_stdout_retrieve (from job-management) - Full stdout (supplementary)aap-mcp-validator - Prerequisite validationhost-fact-inspector - Next step: correlate with host factsresolution-advisor - Next step: get resolution recommendationsexecution-summary - Audit trailUser: "Job #4451 failed halfway through. Analyze the logs."
Agent:
failedrunner_on_failed on task "Install security package" with ansible.builtin.dnf, msg: "No package matching 'nonexistent-package'"RHEcosystemAppEng/agentic-plugins
df1d156
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.