mohan941998/sre-runbooks-automation
GitHub: mohan941998/sre-runbooks-automation
Stars: 0 | Forks: 0
# sre-runbooks-automation
Python & Bash automation scripts for SRE work — health checks, cost optimisation, and incident runbooks. Built from 7 years of production SRE experience.
## What's inside
| Path | Description |
|------|-------------|
| `scripts/health_check.py` | Endpoint health checker with PagerDuty alerts & CloudWatch logging |
| `scripts/cost_optimiser.py` | EC2 rightsizing finder & unattached EBS volume scanner |
| `runbooks/high-error-rate.md` | Step-by-step runbook for high error rate incidents |
## Usage
### Health check
pip install requests boto3
python scripts/health_check.py https://api.myapp.com/health https://api.myapp.com/ready
# With PagerDuty alerts
PAGERDUTY_ROUTING_KEY=your-key python scripts/health_check.py https://api.myapp.com/health
### Cost optimisation
# Configure AWS credentials first
aws configure
python scripts/cost_optimiser.py
# Outputs: cost_report.json + console summary
## Real-world impact
These patterns directly contributed to:
- **35% MTTR reduction** — health checks caught issues before users reported them
- **20% cloud cost savings** — cost optimiser found $18K/year in idle resources
## Stack
Python · Bash · AWS (boto3) · PagerDuty · CloudWatch · K8s
## Author
**Mohankumar Sekar** — Senior SRE | AWS Certified DevOps Pro
📧 mohandevops1994@gmail.com | [LinkedIn](https://www.linkedin.com/in/mohankumar-sekar-9a2261227)