sre-slo-burn-rate-rules
Skill4 starsChanged 25 days agoMITView on GitHub
Use when authoring or fixing Prometheus SLO burn-rate alert rules: generate 4-tier multiwindow rules from an SLO target and counters, then promtool lint and test. Files only, never deploys. 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-alertingSkill
- 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
3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
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 14
Wait for explicit human approval before any prod-changing command, MCP write tool, or external post.
- Distinctive: line 31
If the script warns "can never fire", tell the user.
- Very specific: line 35
Stop. Changing a live Prometheus or rule repo goes through Git/CI with approval (sre-safety-gates).
≈ “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
SLO burn-rate rules
For authoring rule files only. Not for responding to a firing alert: that is sre-engineer, using Responding to a firing burn-rate alert in sre-slo-alerting. Don't generate or test rules during an incident.
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. Process and policy: sre-slo-alerting. Script and references: sre-prometheus-grafana.
Requires sre-prometheus-grafana installed alongside (sibling folder).
Steps
- Get from the user, or ask: SLO name, objective (a ratio such as
0.999), the bad-events counter selector, the all-events counter selector, the labels to keep (defaultjob), and the SLO period (default30d). Check that the metric and label names exist (promtool query series "$PROM_URL" --match='<selector>'), and don't guesscodevsstatus. - Generate:
If the script warns "can never fire", tell the user. With objectives of 99% or lower, the 14.4x tier can't trigger (SRE Workbook, "Extreme Availability Goals").python3 ../sre-prometheus-grafana/scripts/gen-burn-rate-rules.py \ --slo-name <name> --objective <0.999> \ --errors '<metric>{job="<svc>",code=~"5.."}' --total '<metric>{job="<svc>"}' \ --by job --runbook-url 'https://runbooks.example.com/slo/<slo-name>' --out slo-<name>.rules.yml - Validate:
promtool check rules --lint=all --lint-fatal slo-<name>.rules.yml. - Unit-test: copy slo-burn-rate.test.yml. Point
rule_filesat the new file and set the series names, labels,slovalue and annotations to match, then runpromtool test rules <test>.yml. Keep all 7 scenarios: healthy, fast burn, slow burn, reset, 3d tier, 1h tier only, 6h tier only. - Output the rule file, the test file, both promtool results, and the alert routing note: the page alert is
severity=pageand the ticket alert isseverity=ticket, both labelledslo. Inhibit the ticket while the page fires (equal: [slo]). - Stop. Changing a live Prometheus or rule repo goes through Git/CI with approval (
sre-safety-gates). Never call/-/reload.
Output
- Rule file, test file,
promtool checkandpromtool testresults, routing/inhibition note
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.

