Repair playbooks
Reflex includes built-in self-healing playbooks that detect and resolve common production incidents automatically — without waking your team.
How playbooks work
- The Reflex agent continuously monitors your server's health metrics, logs, and process states
- When an incident is detected, the matching playbook executes automatically
- A health check confirms the fix was successful
- You receive a detailed incident report with the timeline, root cause, and actions taken
Every step is logged and auditable — you always know exactly what happened and when.
Available playbooks
PHP & Laravel
| Playbook | What it monitors |
|---|---|
| PHP-FPM OOM recovery | Memory exhaustion in PHP-FPM workers |
| PHP-FPM pool exhaustion | All workers busy, requests queuing |
| Laravel queue death | Queue workers stopped processing |
| Horizon crash recovery | Laravel Horizon supervisor failures |
Web server
| Playbook | What it monitors |
|---|---|
| Nginx 502 Bad Gateway | Upstream services not responding |
| Nginx config failure | Configuration syntax errors after changes |
| SSL certificate expiry | Certificates approaching expiry |
Database
| Playbook | What it monitors |
|---|---|
| MySQL connection storm | Connection count spikes |
| MySQL slow query spike | Slow query rate exceeding baseline |
| Redis memory pressure | Memory exceeding safe thresholds |
System
| Playbook | What it monitors |
|---|---|
| Disk full emergency | Disk usage approaching capacity |
| High load average | Sustained high CPU load |
| Cron job failure | Scheduled tasks failing |
Node.js / Python
| Playbook | What it monitors |
|---|---|
| PM2 process crash | PM2-managed processes entering error state |
| Gunicorn worker timeout | Workers not responding |
Enabling playbooks
Each playbook can be enabled or disabled per server in the dashboard under Server → Playbooks. Trigger thresholds and cooldown periods are configurable to match your environment.
Notifications
Configure who gets notified when a playbook executes:
- Slack — Post to a specific channel
- PagerDuty — Escalate to on-call
- Email — Send to team members
- Webhook — Fire a custom webhook
Incident reports
Every playbook execution generates a detailed incident report in the dashboard, including trigger conditions, timing, diagnostic output, and resolution confirmation.