m
Docker Diag
@mkrdiop
npx machina-cli add skill @mkrdiop/docker-diag --openclawFiles (1)
SKILL.md
712 B
Docker Pro Diagnostic
When a user asks "Why is my container failing?" or "Analyze the logs for [container]", follow these steps:
- Run Extraction: Call
python3 {{skillDir}}/log_processor.py <container_name>. - Analyze: Feed the output (which contains errors and context) into your reasoning engine.
- Report: Summarize the root cause. If it looks like a code error, suggest a fix. If it looks like a resource error (OOM), suggest increasing Docker memory limits.
Example Command
python3 log_processor.py api_gateway_prod
Overview
Docker Pro Diagnostic analyzes container logs to identify root causes using signal extraction. It runs a Python script to extract signals from logs, then uses a reasoning engine to diagnose issues as code errors or resource constraints, and suggests fixes.
How This Skill Works
Run the extraction with python3 {{skillDir}}/log_processor.py <container_name> to pull relevant signals. The tool then feeds the extracted data into a reasoning engine to determine the root cause and propose fixes, such as code corrections or increasing Docker memory limits for resource errors.
When to Use It
- Container is failing or crashing and you need a root-cause analysis
- Logs are noisy and you need signal-based extraction to identify key issues
- You want an actionable report indicating whether the issue is code-related or a resource constraint
- Diagnosing OOM or other memory-related failures and identifying memory-limit adjustments
- Debugging intermittent or flaky container behavior with context-rich analysis
Quick Start
- Step 1: Run Extraction: python3 {{skillDir}}/log_processor.py <container_name>
- Step 2: Analyze: Feed the extraction output into your reasoning engine
- Step 3: Report: Review the root-cause summary and proposed fixes
Best Practices
- Provide the exact container_name when invoking log_processor.py to target the correct container
- Ensure Python3 and Docker are installed and accessible in your environment
- Use the extracted signals as input to the reasoning engine and review the rationale behind conclusions
- If a resource issue is reported, consider increasing Docker memory limits and re-test
- Test any proposed fixes in a staging environment and monitor container behavior after deployment
Example Use Cases
- api_gateway_prod
- db_cluster_primary
- worker_queue_consumer
- analytics_job_runner
- webapp_frontend
Frequently Asked Questions
Add this skill to your agents