sre-slo-alerting
Skill4 starsChanged 24 days agoMITView on GitHub
Use when creating or revising SLIs, SLOs, error budget policy, burn-rate alerts or paging policy, and for alert-fatigue reduction. Not for responding to a firing alert (use sre-engineer).
In this repository84 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .github/copilot-instructions.mdCopilot instructions
- .cursor/rules/sre-safety-gates.mdcCursor rule
- sre-awsSkill
- sre-azureSkill
- sre-capacity-planningSkill
- sre-change-safetySkill
- sre-chaos-engineeringSkill
- sre-cloud-cost-reviewSkill
- sre-database-triageSkill
- sre-datadogSkill
- sre-dependency-mappingSkill
- sre-diagnosticsSkill
- sre-dr-backup-testSkill
- sre-dynatraceSkill
- sre-emudhra-ca-checkSkill
- sre-engineerSkill
- sre-expiry-auditSkill
- sre-gcpSkill
- sre-incident-commandSkill
- sre-incident-communicationSkill
- sre-k8s-safe-remediationSkill
- sre-k8s-triageSkill
- sre-k8s-upgrade-autopilotSkill
- sre-message-queue-triageSkill
- sre-migration-safetySkill
- sre-observability-cost-cutterSkill
- sre-observability-query-cookbookSkill
- sre-oncall-auditSkill
- sre-oncall-handoffSkill
- sre-pagerduty-opsgenieSkill
- sre-php2shell-checkSkill
- sre-postmortem-templatesSkill
- sre-production-readinessSkill
- sre-prometheus-grafanaSkill
- sre-remediation-actionsSkill
- sre-runbook-templatesSkill
- sre-safety-gatesSkill
- sre-security-incident-triageSkill
- sre-service-mesh-triageSkill
- sre-slo-burn-rate-rulesSkill
- sre-terraformSkill
- sre-toil-reviewSkill
- sre-awsSkill
- sre-azureSkill
- sre-capacity-planningSkill
- sre-change-safetySkill
- sre-chaos-engineeringSkill
- sre-cloud-cost-reviewSkill
- sre-database-triageSkill
- sre-datadogSkill
- sre-dependency-mappingSkill
- sre-diagnosticsSkill
- sre-dr-backup-testSkill
- sre-dynatraceSkill
- sre-emudhra-ca-checkSkill
- sre-engineerSkill
- sre-expiry-auditSkill
- sre-gcpSkill
- sre-incident-commandSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 7 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Wait for explicit human approval before any prod-changing command, MCP write tool, or external post.
- Distinctive: line 23
Write the error budget policy.
- Distinctive: line 84
Use rolling windows (28 or 30 days) to avoid 'reset' effects at month end.
- Distinctive: line 85
Don't aim for 100%; leave room for innovation and failure.
- Distinctive: line 86
Ensure both developers and SREs agree on the consequences of a budget depletion.
- Distinctive: line 99
No alert without action: If you don't know what to do when an alert fires, don't create it.
- Very specific: line 134
Read-only checks (example for a 99.9% SLO with rules from sre-prometheus-grafana's gen-burn-rate-rules.py, which fire …
- Distinctive: line 151
Slow or very slow burn (ticket): not an emergency. Find which route, dependency, retry pattern or gradual latency regression is spending …
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
SLOs and Alerting
Safety gates (REQUIRED)
- Read-only diagnosis first.
- Propose each change with risk (low/med/high) and reversibility.
- Wait for explicit human approval before any prod-changing command, MCP write tool, or external post.
- Act only as approved, verify, and stop and escalate if anything gets worse.
Full rules: sre-safety-gates. Read-only MCP setup: sre-safety-gates/references/mcp.md.
One flow: pick SLIs -> set SLOs -> error budget policy -> burn-rate alerts -> prune noise.
Workflow
- Choose SLIs with the selection guide (Part 1).
- Fill the SLO template; agree targets and windows with the service owner.
- Write the error budget policy.
- Derive burn-rate alerts (Part 2) from the SLO; every alert links to a runbook (
sre-runbook-templates). - Review existing alerts; remove or merge those without an action.
- Propose rule changes; apply to live systems only after approval (sre-safety-gates).
Part 1 — SLOs
SLI selection guide
Request driven
- Availability: Proportion of valid requests that were successful.
- Latency: Proportion of valid requests that were faster than a threshold.
- Quality: Proportion of valid requests that were served without degradation.
Pipeline driven
- Freshness: Proportion of data that was updated recently.
- Correctness: Proportion of data that passed validation.
- Coverage: Proportion of total data that was processed.
Storage driven
- Durability: Proportion of data that was not lost.
- Throughput: Proportion of time throughput was above threshold.
SLO markdown template
# SLO: [Service Name] - [Objective Name]
## 1. Goal
State the purpose of this SLO (e.g., "Ensure checkout is available and fast for users").
## 2. SLI Definition
- **Metric Source:** [e.g., Prometheus http_requests_total]
- **Numerator:** [e.g., requests with status < 500]
- **Denominator:** [e.g., all valid requests]
- **Measurement Window:** [e.g., rolling 28 days]
## 3. SLO Target
- **Availability Target:** [e.g., 99.9%]
- **Latency Target:** [e.g., 95% < 300ms]
## 4. Error Budget Policy
- **Alerting Thresholds:**
- Page: [e.g., 2% budget burn in 1h]
- Ticket: [e.g., 10% budget burn in 24h]
- **Action Policy:**
- If budget >= 25%: Feature development continues.
- If budget is between 0% and 25%: Heightened review of all changes.
- If budget <= 0%: Freeze feature releases, focus on reliability.
## 5. Exclusions
- [e.g., Load testing traffic]
- [e.g., Third-party outages out of our control]Error budget best practices
- Use rolling windows (28 or 30 days) to avoid 'reset' effects at month end.
- Don't aim for 100%; leave room for innovation and failure.
- Ensure both developers and SREs agree on the consequences of a budget depletion.
- Automate the measurement; manual SLOs are never accurate.
Part 2 — Alerting
Alerting principles
Symptom vs cause
- Symptom: The service is slow (alert on this)
- Cause: The database has high CPU (investigate this after the symptom alert)
No alert without action: If you don't know what to do when an alert fires, don't create it.
Pager vs ticket
- Pager: Requires immediate human intervention (user impact occurring now).
- Ticket: Needs attention within business hours (potential future impact).
Burn rate strategies (multiwindow, multi-burn-rate)
Alert only when both the long and the short window exceed N * (1 - <slo>). The short window confirms the burn is still happening.
| Tier | Burn rate | Long / short window | Budget used (30d) | Action |
| Fast | 14.4x | 1h / 5m | 2% in 1h | Page |
| Medium | 6x | 6h / 30m | 5% in 6h | Page |
| Slow | 3x | 1d / 2h | 10% in 1d | Ticket |
| Very slow | 1x | 3d / 6h | 10% in 3d | Ticket |
- Build the 1d and 3d windows from recording rules, not raw queries.
for:is only a noise filter;for: 0mis valid because the short window already de-noises.- Full Prometheus rule file (promtool-validated):
sre-prometheus-grafana; generate your own with/sre-slo-burn-rate-rules.
Responding to a firing burn-rate alert (reference)
Reference for sre-engineer when a burn-rate alert fires; designing the alerts stays above. Source: Google SRE Workbook, Alerting on SLOs (Tables 5-4, 5-6 and 5-8).
Burn rate is how fast the error budget is being spent relative to the SLO: 1x spends exactly the whole budget over the SLO period. Time to exhaust the whole budget = period / burn rate. With part of the budget already spent: remaining fraction x period / burn rate.
| Alert | Burn rate (long / short window) | Budget spent when it fires (30d) | Whole budget gone in (30d) | What it means | Response |
| Fast burn | 14.4x (1h / 5m) | 2% | about 2 days (50 h) | Something broke recently and is still broken | Page: respond now |
| Medium burn | 6x (6h / 30m) | 5% | 5 days | Significant sustained errors | Page: respond now |
| Slow burn | 3x (1d / 2h) | 10% | 10 days | Chronic degradation | Ticket: next business day |
| Very slow burn | 1x (3d / 6h) | 10% | 30 days | On track to spend exactly the budget | Ticket |
Read-only checks (example for a 99.9% SLO with rules from sre-prometheus-grafana's gen-burn-rate-rules.py, which fire SLOErrorBudgetBurnFast / SLOErrorBudgetBurnSlow; use your SLO name):
# current burn rate; above the tier's threshold = still burning
slo:sli_error:ratio_rate5m{slo="<slo>"} / (1 - 0.999) # short window
slo:sli_error:ratio_rate1h{slo="<slo>"} / (1 - 0.999) # long windowFast or medium burn (page), first 15 minutes:
- Is it still burning? If the short-window burn rate is back under the threshold, the spike has passed: record it and keep watching instead of mitigating.
- Is it real? Check request volume. On a low-traffic service a handful of errors can be a 1,000x burn rate (Workbook, "Low-Traffic Services").
- Scope: which route, status code, region, zone or version is failing (use
sre-diagnosticsand your observability adapter). - What changed in the last 1-2 hours: deploys, feature flags, config, infrastructure, dependencies.
- Mitigate before root cause: propose a rollback or flag-off with risk and reversibility from
sre-remediation-actions, and wait for approval. - Compute the remaining budget and time to exhaustion and put both in the incident notes.
Slow or very slow burn (ticket): not an emergency. Find which route, dependency, retry pattern or gradual latency regression is spending budget, forecast the date the budget runs out, and file it with the owning team. Apply the error budget policy above.
Escalate: for a fast or medium burn with confirmed user impact, get an Incident Commander (sre-incident-command). Escalate to the service owner if it isn't mitigated within 30 minutes, if the remaining budget falls below 25% (the same line as the error budget policy above), or if the budget is spent (the error budget policy applies). Escalate a slow burn when a page tier fires as well or the budget forecast runs out before the period ends. The 30-minute and 25% lines are this pack's defaults, not Workbook values; set your own in your error budget policy.
Alert definition template
# Alert: [Service] error budget burn
## 1. Description
SLO [<slo>, e.g. 99.9%] over [30d] is burning budget. Impact: [user-facing symptom].
## 2. Trigger Conditions (all four tiers; threshold = N * (1 - <slo>))
- **Page:** (ratio_1h > 14.4*(1-<slo>) AND ratio_5m > 14.4*(1-<slo>))
OR (ratio_6h > 6*(1-<slo>) AND ratio_30m > 6*(1-<slo>))
- **Ticket:** (ratio_1d > 3*(1-<slo>) AND ratio_2h > 3*(1-<slo>))
OR (ratio_3d > 1*(1-<slo>) AND ratio_6h > 1*(1-<slo>))
- **Ratios:** recording rules `slo:sli_error:ratio_rate<window>` with `slo="<slo>"` (from `gen-burn-rate-rules.py`)
- **for:** none (the generator default), or a short noise filter only
## 3. Runbook Link
[Link to sre-runbook-templates output]
## 4. Troubleshooting Steps
1. Check dependency [X]
2. Verify deployment [Y]
3. Look for logs matching [Z]Alert reduction techniques
- Inhibit: Silence dependent alerts when the root cause is already alerting.
- Group: Batch similar alerts together (e.g., by service or region).
- Deduplicate: Ensure multiple paths to the same alert are merged.
- Tune: For latency, use histogram percentiles (p95/p99) rather than averages.
Output
- Completed SLO document: SLIs with queries, targets, windows, error budget policy, owners
- Alert definitions (query, threshold, burn-rate windows, severity, runbook link) and list of alerts to remove/merge
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

