/find-root-cause
Trace a problem from symptom → root cause. Don't stop at "restart fixes it" — find WHY and WHERE the permanent fix lives.
Usage
/find-root-cause # Describe the problem, I'll trace it
/find-root-cause "telegraf errors" # Start with a specific symptom
The Chain
Every problem has a chain. Trace it:
Symptom → Immediate cause → Config/Code source → Generator/Build → Root template/data
Example: Pipeline Errors
Symptom: Telegraf write errors in logs
Immediate: Dead InfluxDB (10.0.0.5) in container config
Config source: 07-output/telegraf.d/5m/*.yml.conf (mounted volume)
Generator: 01-core/scripts/020_gen_telegraf_unified.sh
Root: 01-core/telegraf_config_map.yml → db2.enabled: true
Fix at symptom = temporary. Fix at root = permanent.
Instructions
Step 1: Identify the Symptom
Ask: What's broken? Get the error message, log output, or observable behavior.
Step 2: Trace Backwards
For each level, ask: "Where does this come from?"
| Level | Question | Tool |
|---|---|---|
| Runtime | What process/container shows the error? | docker logs, journalctl, app logs |
| Config | What config file controls this behavior? | docker inspect, mount points, env vars |
| Source | Where is that config generated/stored? | grep -r, git history, build scripts |
| Generator | What script/workflow produces it? | CI/CD, Makefile, build pipeline |
| Root | What data/template feeds the generator? | Source YAML, env files, DB records |
Step 3: Verify Each Level
At each level, confirm:
- Is this the actual cause, or just a relay?
- If I fix HERE, will it survive a redeploy/restart/rebuild?
- Is there a level deeper?
Step 4: Report
## Root Cause Analysis
**Symptom**: [what's broken]
**Chain**:
1. [Runtime] → [what you see]
2. [Config] → [where it's configured]
3. [Source] → [where config comes from]
4. [Root] → [the actual source of truth]
**Fix at root**: [what to change]
**Why not fix at symptom**: [why it would come back]
**Verification**: [how to confirm the fix]
Step 5: Fix
Fix at the deepest level possible. Then verify the fix propagates up the chain.
Philosophy
"Restart fixes the symptom. Understanding fixes the problem."
A runbook that says "restart" is a band-aid. A root cause analysis that says "disable db2 in source template" is a cure.
