How We Reduced MTTR by 40% with Prometheus and Alertmanager
Executive summary
In this case study we describe a practical program we ran to reduce Mean Time To Repair (MTTR) across our core services by 40%. The work focused on three pillars: alert signal quality, fast and accurate routing, and playbooks + automation. With Prometheus evaluating alerts and Alertmanager handling routing, we tuned rules, added runbooks, introduced inhibition/grouping, and used webhooks for automated remediation.
Baseline — where we started
- MTTR: ~75 minutes (median) across production incidents.
- High alert volume: on-call engineers received ~120 alerts/day (many duplicates and low-value warnings).
- No standard runbook links in alerts and inconsistent routing — on-call often had to identify owner manually.
- Few automations — most fixes required manual intervention.
Goals
- Reduce median MTTR by at least 30% in 3 months.
- Cut alert volume and duplicates by >50% for on-call engineers.
- Automate simple remediation actions for the most common incidents.
What we changed — summary of actions
- Label-driven alert design: added consistent labels (service, severity, team, runbook).
- Tuned alert rules: adjusted thresholds and added rate/duration conditions to reduce flapping and false positives.
- Alertmanager routing improvements: group_by, grouping windows, inhibition rules, and multi-receiver routing to the correct teams and escalation tools.
- Runbooks and context in alerts: added links + remediation steps in alert annotations.
- Automation via webhooks: for a handful of frequent, low-risk fixes (restart pod, scale up deployment, clear queue).
- Measure & iterate: created dashboards tracking MTTA/MTTR, alerts per service, and alerts per on-call shift.
Implementation details — examples
1) Prometheus alert rule (example)
# example: high error rate sustained for 3m
groups:
- name: service.rules
rules:
- alert: HighRequestErrorRate
expr: |
increase(http_requests_total{job="payments",status=~"5.."}[3m])
/
increase(http_requests_total{job="payments"}[3m])
> 0.05
for: 3m
labels:
severity: critical
service: payments
team: payments
annotations:
summary: "Payments service: >5% 5xx rate in last 3m"
runbook: "https://wiki.company.com/runbooks/payments-high-5xx"
Key points: use for to avoid transient blips; attach runbook and team labels for routing and immediate context.
2) Alertmanager routing snippet (example)
route:
group_by: ['alertname','service','team']
group_wait: 20s
group_interval: 4m
repeat_interval: 2h
receiver: 'default-email'
routes:
- match:
severity: 'critical'
receiver: 'pagerduty-main'
- match_re:
team: 'payments|billing'
receiver: 'slack-payments'
Grouping reduces notification storms and gives responders a batch view. Routes send critical alerts to PagerDuty and service-specific alerts to team Slack channels.
3) Inhibition rules (example)
inhibit_rules:
- source_match:
severity: 'critical'
target_match:
severity: 'warning'
equal: ['service', 'instance']
When a critical alert fires for a service, related lower-severity warnings are suppressed — reducing noisy duplicates.
4) Runbooks & playbooks
Every alert includes an annotation runbook that points to a concise step-by-step playbook. Example runbook items:
- Check service health dashboard (link)
- Inspect recent deploys and pod restarts
- Command to restart the failing pod or scale deployment
- How to roll back a bad deployment
- How to acknowledge and silence related alerts
5) Automated remediation via webhook
We implemented a small remediation service that:
- Accepts Alertmanager webhook POSTs
- Validates the alert payload and the alert fingerprint
- Executes low-risk actions (e.g., scaling a deployment, restarting a pod) after checking preconditions
- Logs actions and creates a ticket when automation runs
# alertmanager receiver
receivers:
- name: 'webhook-remediation'
webhook_configs:
- url: 'https://remediate.company.com/alert'
send_resolved: true
Measurement — how we tracked progress
We created dashboards and tracked the following KPIs weekly:
- Median MTTR (minutes)
- Median MTTA (time to acknowledge)
- Alerts per on-call per shift
- Number of automated remediation actions and their success rate
- False positive rate (alerts closed without action)
Results
- MTTR: reduced from ~75 minutes to ~45 minutes (≈40% reduction) within 8 weeks.
- MTTA: median time to acknowledge fell by ~35% due to better routing and PagerDuty escalation.
- Alert volume: actionable alerts per on-call shift dropped from ~120/day to ~45/day (≈62% reduction) after tuning and inhibition.
- Automation: ~18% of incidents were resolved automatically (low-risk fixes), and automation had a 92% success rate.
- Developer satisfaction: on-call burnout indicators improved (fewer wake-ups for non-actionable alerts).
Lessons learned & pitfalls
- Start small: automate only low-risk, well-understood actions first.
- Label consistently: routing depends on structured labels. Invest time to standardize labels across teams.
- Use runbooks: the single biggest win was having a link to a short, actionable runbook in every alert.
- Monitor your changes: every tuning change must be measured — reduce thresholds slowly to avoid missing real incidents.
- Secure automation: webhook endpoints must be authenticated and idempotent to avoid repeated destructive actions.
Recommended checklist to reproduce these results
- Inventory current alerts and label usage.
- Remove duplicate/low-value alerts and add
forclauses to transient rules. - Add
team,service, andrunbooklabels to all rules. - Configure Alertmanager grouping, inhibition, and multi-receiver routing.
- Create and attach short runbooks to alerts (1–3 steps).
- Implement a webhook remediation service for a small set of repeatable fixes.
- Track MTTA/MTTR and alerts per shift; iterate weekly.
Conclusion
Reducing MTTR is not a single technical trick — it’s a program combining signal quality, routing, readable context, and selective automation. Using Prometheus for reliable evaluation and Alertmanager for smart routing gave us the control we needed to send the right alerts to the right people, reduce noise, and automate repetitive fixes. The result: faster detection, faster remediation, and a calmer on-call rotation.