Quick analysis of must-gather data - runs all analysis scripts and provides comprehensive cluster diagnostics
Analyzes OpenShift must-gather data using specialized scripts to provide comprehensive cluster diagnostics and health summaries.
/plugin marketplace add openshift-eng/ai-helpers/plugin install must-gather@ai-helpers[must-gather-path] [component]must-gather:analyze
/must-gather:analyze [must-gather-path] [component]
The analyze command performs comprehensive analysis of OpenShift must-gather diagnostic data. It runs specialized Python analysis scripts to extract and summarize cluster health information across multiple components.
The command can analyze:
You can request analysis of the entire cluster or focus on a specific component.
Required Directory Structure:
Must-gather data typically has this structure:
must-gather/
└── registry-ci-openshift-org-origin-...-sha256-<hash>/
├── cluster-scoped-resources/
├── namespaces/
└── ...
The actual must-gather directory is the subdirectory with the hash name, not the parent directory.
Required Scripts:
Analysis scripts are bundled with this plugin at:
<plugin-root>/skills/must-gather-analyzer/scripts/
├── analyze_clusterversion.py
├── analyze_clusteroperators.py
├── analyze_nodes.py
├── analyze_pods.py
├── analyze_network.py
├── analyze_ovn_dbs.py
├── analyze_events.py
├── analyze_etcd.py
└── analyze_pvs.py
Where <plugin-root> is the directory where this plugin is installed (typically ~/.cursor/commands/ai-helpers/plugins/must-gather/ or similar).
CRITICAL: Script-Only Analysis
plugins/must-gather/skills/must-gather-analyzer/scripts/Script Availability Check:
Before running any analysis:
Locate the scripts directory by searching for a known script:
SCRIPT_PATH=$(find ~ -name "analyze_clusteroperators.py" -path "*/must-gather/skills/must-gather-analyzer/scripts/*" 2>/dev/null | head -1)
if [ -z "$SCRIPT_PATH" ]; then
echo "ERROR: Must-gather analysis scripts not found."
echo "Please ensure the must-gather plugin from ai-helpers is properly installed."
exit 1
fi
# All scripts are in the same directory, so just get the directory
SCRIPTS_DIR=$(dirname "$SCRIPT_PATH")
If scripts cannot be found, STOP and report to the user:
The must-gather analysis scripts could not be located. Please ensure the must-gather plugin from openshift-eng/ai-helpers is properly installed in your Claude Code plugins directory.
The command performs the following steps:
Validate Must-Gather Path:
cluster-scoped-resources/ and namespaces/ directoriesDetermine Analysis Scope:
STEP 1: Check for SPECIFIC component keywords
If the user mentions a specific component, run ONLY that script:
analyze_pods.py ONLYanalyze_etcd.py ONLYanalyze_network.py ONLYanalyze_ovn_dbs.py ONLYanalyze_nodes.py ONLYanalyze_clusteroperators.py ONLYanalyze_clusterversion.py ONLYanalyze_events.py ONLYanalyze_pvs.py ONLYanalyze_prometheus.py ONLYanalyze_windows_logs.py ONLYSTEP 2: No specific component mentioned
If generic request like "analyze must-gather", "/must-gather:analyze", or "check the cluster", run ALL scripts in this order:
analyze_clusterversion.py)analyze_clusteroperators.py)analyze_nodes.py)analyze_pods.py --problems-only)analyze_network.py)analyze_events.py --type Warning --count 50)analyze_etcd.py)analyze_pvs.py)analyze_prometheus.py)host_service_logs/windows/ directory exists in the must-gatheranalyze_windows_logs.py <must-gather-path>Locate Plugin Scripts:
$SCRIPTS_DIRExecute Analysis Scripts:
python3 "$SCRIPTS_DIR/<script>.py" <must-gather-path>
Example:
python3 "$SCRIPTS_DIR/analyze_clusteroperators.py" ./must-gather.local.123/quay-io-...
Synthesize Results: Generate findings and recommendations based on script output
The command outputs structured analysis results to stdout:
For Component-Specific Analysis:
For Full Analysis:
================================================================================
MUST-GATHER ANALYSIS SUMMARY
================================================================================
[Script outputs organized by component]
CLUSTER VERSION:
[output from analyze_clusterversion.py]
CLUSTER OPERATORS:
[output from analyze_clusteroperators.py]
NODES:
[output from analyze_nodes.py]
PROBLEMATIC PODS:
[output from analyze_pods.py --problems-only]
NETWORK STATUS:
[output from analyze_network.py]
WARNING EVENTS (Last 50):
[output from analyze_events.py --type Warning --count 50]
ETCD CLUSTER HEALTH:
[output from analyze_etcd.py]
STORAGE (PVs/PVCs):
[output from analyze_pvs.py]
MONITORING (Alerts):
[output from analyze_prometheus.py]
================================================================================
FINDINGS AND RECOMMENDATIONS
================================================================================
Critical Issues:
- [Critical problems requiring immediate attention]
Warnings:
- [Potential issues or degraded components]
Recommendations:
- [Specific next steps for investigation]
Logs to Review:
- [Specific log files to examine based on findings]
Full cluster analysis:
/must-gather:analyze ./must-gather/registry-ci-openshift-org-origin-4-20-...-sha256-abc123/
Runs all analysis scripts and provides comprehensive cluster diagnostics.
Analyze pod issues only:
/must-gather:analyze ./must-gather/registry-ci-openshift-org-origin-4-20-...-sha256-abc123/ analyze the pod statuses
Runs only analyze_pods.py to focus on pod-related issues.
Check etcd health:
/must-gather:analyze check etcd health
Asks for must-gather path, then runs only analyze_etcd.py.
Network troubleshooting:
/must-gather:analyze ./must-gather/registry-ci-openshift-org-origin-4-20-...-sha256-abc123/ show me network issues
Runs only analyze_network.py for network-specific analysis.
cluster-scoped-resources/ and namespaces/, not the parent directory