Recurring engineering effort
Automating Away Repeat Investigations
Quick Answer
Human investigation drops once predictable failures get detected and fixed by code. The method is to log every incident that needed a person, group them by component and failure type, document root causes and exact remediation steps, then automate diagnostics and safe remediation for the most frequent patterns. Better signal in monitoring, self-healing designs and regular review of incident data keep the load on engineers falling.
Why This Happens
System issues require human investigation for several reasons. Undefined failure modes are common in complex distributed systems. Monitoring often lacks sufficient context for automated diagnosis. Alerts trigger on symptoms, not root causes. System behavior evolves faster than monitoring adaptations. Engineers frequently address novel edge cases with manual procedures. Each unique investigation contributes to tribal knowledge without codified resolution paths. This creates a reliance on individual expertise, not system-level resilience. Reducing time to diagnosis is crucial. Production systems often lack robust automated recovery mechanisms for all failure types. Manual remediation might be the only available action for many critical events. Incomplete or noisy observability data also forces manual correlation across disparate systems.Investigation Process
- Identify Recurring Investigation Patterns. Log all incidents requiring human intervention. Categorize them by system component, failure type, and remediation steps.
- Analyze High-Frequency Patterns. Focus on the few incident categories that consume most of the investigation time. These represent prime candidates for automation.
- Examine Diagnostic Data Sources. Determine which logs, metrics, or traces are consistently used during investigations. Identify gaps in data availability or correlation.
- Document Root Causes and Remediation. For each high-frequency incident, precisely define its root cause and the exact steps taken for resolution.
- Evaluate Automation Potential. Assess if the diagnostic process can be replicated by code. Determine if remediation steps are deterministic and safe to automate.
- Prioritize Automation Candidates. Select incidents with high recurrence, clear root causes, and low-risk automated remediation paths. Complex or volatile incidents might require advanced automated diagnostics first.
- Implement Automated Diagnostics. Develop scripts or services to detect specific conditions identified in step 3. Generate actionable alerts with complete context.
- Implement Automated Remediation. For suitable candidates, develop automated runbooks or self-healing mechanisms based on documented remediation.
- Monitor Automation Effectiveness. Track incidents handled by automation. Verify the automation's success rate. Adjust detection and remediation logic as needed.
Practical Example
A service processing user uploads frequently experiencedOutOfMemoryError conditions on specific worker nodes. This caused processing delays and required manual restarts of affected nodes. The investigation process involved checking service logs for memory usage patterns, identifying the specific worker, and SSHing to restart the process. This occurred several times per week. Analysis showed these incidents were consistently tied to large image file uploads during peak hours. The team documented the specific log signatures preceding the OOM error and the exact commands for restarting the service and clearing temporary file caches. An automated solution was developed. A new monitoring alert was configured to watch for the specific memory pressure signature and log messages. When triggered, a new automated runbook executed. This runbook executed a graceful shutdown of the affected worker process, cleared specific temporary directories, and then restarted the process. This reduced human intervention to rare cases where the automated restart failed, which then triggered a higher-severity alert for manual review. Silent failures in background job systems were also addressed by this approach, as the monitoring caught the OOM before complete process termination.
Preventing Recurrence
To prevent recurrence and ongoing human investigation, system designers must embed observability and automation into the development lifecycle. Standardize logging formats and ensure log contextualization. Implement comprehensive metric collection, focusing on service health, resource utilization, and business-critical flow success rates. Develop self-healing capabilities for common failure modes. Design systems with explicit failure domains and graceful degradation. Proactively create and test automated runbooks for predictable incidents. Invest in anomaly detection systems that can flag deviations from baseline behavior without pre-defined thresholds. Regularly review incident data to identify new patterns for automation. Refine alert noise by tuning thresholds and correlating alerts into actionable incidents. Implement chaos engineering practices to uncover unknown failure modes and drive automation requirements. Integrating production work into engineering capacity planning ensures resources are allocated for these preventative measures.What Teams Usually Do Instead
Teams often rely heavily on verbose logging and manual log analysis during incidents. They might implement too many low-fidelity alerts, leading to alert fatigue. This encourages engineers to ignore or snooze alerts rather than investigate. Another common approach is 'swarming' on every incident, putting multiple engineers on a problem that could be resolved by one or by automation. Teams frequently focus on 'fixing' the immediate problem without thoroughly documenting the root cause or automating the remediation. They might blame individual errors rather than improving system resilience. They also accumulate extensive tribal knowledge about specific system quirks without codifying it into automated responses or documentation. This makes new engineers less effective and increases the burden on experienced staff.Key Takeaways
- Categorize recurring incidents to find automation opportunities.
- Automate detection and remediation for predictable issues.
- Enhance monitoring with contextual, high-fidelity signals.
- Build systems for self-healing and graceful degradation.
- Shift from reactive debugging to proactive system hardening.
See also how we help teams build products and reducing unplanned engineering work.
Frequently Asked Questions
How Do You Reduce Issues That Need Human Investigation?
We shift effort from reactive debugging to proactive remediation by automating responses to known behaviors and improving the signal-to-noise ratio in monitoring. Conditions with established remediation paths are the first candidates, and automation is monitored for its success rate and adjusted as needed.
Why Do System Issues Need a Person to Investigate?
We usually find undefined failure modes in complex distributed systems, monitoring that lacks context for automated diagnosis, and alerts that fire on symptoms rather than root causes. Noisy observability data also forces engineers to correlate across disparate systems by hand, and tribal knowledge never becomes a codified resolution path.
Which Incidents Should We Automate First?
We pick incidents with high recurrence, clear root causes and low-risk automated remediation paths. Complex or volatile incidents may need better automated diagnostics first. We categorize all human-handled incidents by component, failure type and remediation steps to see which patterns consume the most investigation time.
What Is a Self-Healing Runbook?
We use the term for an automated runbook that runs when monitoring detects a known condition. In the example, a memory pressure alert triggered a graceful shutdown of the affected worker, cleared temporary directories and restarted the process, which left humans only the rare failed restarts.
What Do Teams Usually Do Instead of Automating?
We often see teams lean on verbose logging and manual log analysis, add too many low-fidelity alerts that cause fatigue, swarm several engineers on every incident, and fix the immediate problem without documenting the root cause. That keeps knowledge in individual heads and burdens experienced staff.
About the author
Better Software Team
Product and engineering team
Better Software Team is the product and engineering team at Better Software. We build new software products and improve existing applications and systems, with deeper experience in healthcare, finance and energy.