Slo Implementation
Unverified●30/40Claude Code◐PartialHas SKILL.md but declares no allowed-tools — Claude Code will ask for permission each time
Cursor◐PartialPlain prose you can paste in — but no Cursor rules file
Codex◐PartialPlain prose you can paste in — but no AGENTS.md
Gemini CLI◐PartialPlain prose you can paste in
Copilot◐PartialPlain prose you can paste in — but no Copilot instructions file
npx agentalley add slo-implementationWho is stuck, and on what
Define and implement Service Level Indicators (SLIs) and Service Level Objectives (SLOs) with error budgets and alerting. Use when establishing reliability targets, implementing SRE practices, or measuring service performance.
The whole source
Frontmatter — 2 properties
| name | slo-implementation |
|---|---|
| description | Define and implement Service Level Indicators (SLIs) and Service Level Objectives (SLOs) with error budgets and alerting. Use when establishing reliability targets, implementing SRE practices, or measuring service performance. |
| 1 | --- |
| 2 | name: slo-implementation |
| 3 | description: Define and implement Service Level Indicators (SLIs) and Service Level Objectives (SLOs) with error budgets and alerting. Use when establishing reliability targets, implementing SRE practices, or measuring service performance. |
| 4 | ---A5 — No allowed-tools declared — no way to tell what this skill may touch |
| 5 | |
| 6 | # SLO Implementation |
| 7 | |
| 8 | Framework for defining and implementing Service Level Indicators (SLIs), Service Level Objectives (SLOs), and error budgets. |
| 9 | |
| 10 | ## Purpose |
| 11 | |
| 12 | Implement measurable reliability targets using SLIs, SLOs, and error budgets to balance reliability with innovation velocity. |
| 13 | |
| 14 | ## When to Use |
| 15 | |
| 16 | - Define service reliability targets |
| 17 | - Measure user-perceived reliability |
| 18 | - Implement error budgets |
| 19 | - Create SLO-based alerts |
| 20 | - Track reliability goals |
| 21 | |
| 22 | ## SLI/SLO/SLA Hierarchy |
| 23 | |
| 24 | ``` |
| 25 | SLA (Service Level Agreement) |
| 26 | ↓ Contract with customers |
| 27 | SLO (Service Level Objective) |
| 28 | ↓ Internal reliability target |
| 29 | SLI (Service Level Indicator) |
| 30 | ↓ Actual measurement |
| 31 | ``` |
| 32 | |
| 33 | ## Defining SLIs |
| 34 | |
| 35 | ### Common SLI Types |
| 36 | |
| 37 | #### 1. Availability SLI |
| 38 | |
| 39 | ```promql |
| 40 | # Successful requests / Total requests |
| 41 | sum(rate(http_requests_total{status!~"5.."}[28d])) |
| 42 | / |
| 43 | sum(rate(http_requests_total[28d])) |
| 44 | ``` |
| 45 | |
| 46 | #### 2. Latency SLI |
| 47 | |
| 48 | ```promql |
| 49 | # Requests below latency threshold / Total requests |
| 50 | sum(rate(http_request_duration_seconds_bucket{le="0.5"}[28d])) |
| 51 | / |
| 52 | sum(rate(http_request_duration_seconds_count[28d])) |
| 53 | ``` |
| 54 | |
| 55 | #### 3. Durability SLI |
| 56 | |
| 57 | ``` |
| 58 | # Successful writes / Total writes |
| 59 | sum(storage_writes_successful_total) |
| 60 | / |
| 61 | sum(storage_writes_total) |
| 62 | ``` |
| 63 | |
| 64 | **Reference:** See `references/slo-definitions.md` |
| 65 | |
| 66 | ## Setting SLO Targets |
| 67 | |
| 68 | ### Availability SLO Examples |
| 69 | |
| 70 | | SLO % | Downtime/Month | Downtime/Year | |
| 71 | | ------ | -------------- | ------------- | |
| 72 | | 99% | 7.2 hours | 3.65 days | |
| 73 | | 99.9% | 43.2 minutes | 8.76 hours | |
| 74 | | 99.95% | 21.6 minutes | 4.38 hours | |
| 75 | | 99.99% | 4.32 minutes | 52.56 minutes | |
| 76 | |
| 77 | ### Choose Appropriate SLOs |
| 78 | |
| 79 | **Consider:** |
| 80 | |
| 81 | - User expectations |
| 82 | - Business requirements |
| 83 | - Current performance |
| 84 | - Cost of reliability |
| 85 | - Competitor benchmarks |
| 86 | |
| 87 | **Example SLOs:** |
| 88 | |
| 89 | ```yaml |
| 90 | slos: |
| 91 | - name: api_availability |
| 92 | target: 99.9 |
| 93 | window: 28d |
| 94 | sli: | |
| 95 | sum(rate(http_requests_total{status!~"5.."}[28d])) |
| 96 | / |
| 97 | sum(rate(http_requests_total[28d])) |
| 98 | |
| 99 | - name: api_latency_p95 |
| 100 | target: 99 |
| 101 | window: 28d |
| 102 | sli: | |
| 103 | sum(rate(http_request_duration_seconds_bucket{le="0.5"}[28d])) |
| 104 | / |
| 105 | sum(rate(http_request_duration_seconds_count[28d])) |
| 106 | ``` |
| 107 | |
| 108 | ## Error Budget Calculation |
| 109 | |
| 110 | ### Error Budget Formula |
| 111 | |
| 112 | ``` |
| 113 | Error Budget = 1 - SLO Target |
| 114 | ``` |
| 115 | |
| 116 | **Example:** |
| 117 | |
| 118 | - SLO: 99.9% availability |
| 119 | - Error Budget: 0.1% = 43.2 minutes/month |
| 120 | - Current Error: 0.05% = 21.6 minutes/month |
| 121 | - Remaining Budget: 50% |
| 122 | |
| 123 | ### Error Budget Policy |
| 124 | |
| 125 | ```yaml |
| 126 | error_budget_policy: |
| 127 | - remaining_budget: 100% |
| 128 | action: Normal development velocity |
| 129 | - remaining_budget: 50% |
| 130 | action: Consider postponing risky changes |
| 131 | - remaining_budget: 10% |
| 132 | action: Freeze non-critical changes |
| 133 | - remaining_budget: 0% |
| 134 | action: Feature freeze, focus on reliability |
| 135 | ``` |
| 136 | |
| 137 | **Reference:** See `references/error-budget.md` |
| 138 | |
| 139 | ## SLO Implementation |
| 140 | |
| 141 | ### Prometheus Recording Rules |
| 142 | |
| 143 | ```yaml |
| 144 | # SLI Recording Rules |
| 145 | groups: |
| 146 | - name: sli_rules |
| 147 | interval: 30s |
| 148 | rules: |
| 149 | # Availability SLI |
| 150 | - record: sli:http_availability:ratio |
| 151 | expr: | |
| 152 | sum(rate(http_requests_total{status!~"5.."}[28d])) |
| 153 | / |
| 154 | sum(rate(http_requests_total[28d])) |
| 155 | |
| 156 | # Latency SLI (requests < 500ms) |
| 157 | - record: sli:http_latency:ratio |
| 158 | expr: | |
| 159 | sum(rate(http_request_duration_seconds_bucket{le="0.5"}[28d])) |
| 160 | / |
| 161 | sum(rate(http_request_duration_seconds_count[28d])) |
| 162 | |
| 163 | - name: slo_rules |
| 164 | interval: 5m |
| 165 | rules: |
| 166 | # SLO compliance (1 = meeting SLO, 0 = violating) |
| 167 | - record: slo:http_availability:compliance |
| 168 | expr: sli:http_availability:ratio >= bool 0.999 |
| 169 | |
| 170 | - record: slo:http_latency:compliance |
| 171 | expr: sli:http_latency:ratio >= bool 0.99 |
| 172 | |
| 173 | # Error budget remaining (percentage) |
| 174 | - record: slo:http_availability:error_budget_remaining |
| 175 | expr: | |
| 176 | (sli:http_availability:ratio - 0.999) / (1 - 0.999) * 100 |
| 177 | |
| 178 | # Error budget burn rate |
| 179 | - record: slo:http_availability:burn_rate_5m |
| 180 | expr: | |
| 181 | (1 - ( |
| 182 | sum(rate(http_requests_total{status!~"5.."}[5m])) |
| 183 | / |
| 184 | sum(rate(http_requests_total[5m])) |
| 185 | )) / (1 - 0.999) |
| 186 | ``` |
| 187 | |
| 188 | ### SLO Alerting Rules |
| 189 | |
| 190 | ```yaml |
| 191 | groups: |
| 192 | - name: slo_alerts |
| 193 | interval: 1m |
| 194 | rules: |
| 195 | # Fast burn: 14.4x rate, 1 hour window |
| 196 | # Consumes 2% error budget in 1 hour |
| 197 | - alert: SLOErrorBudgetBurnFast |
| 198 | expr: | |
| 199 | slo:http_availability:burn_rate_1h > 14.4 |
| 200 | and |
| 201 | slo:http_availability:burn_rate_5m > 14.4 |
| 202 | for: 2m |
| 203 | labels: |
| 204 | severity: critical |
| 205 | annotations: |
| 206 | summary: "Fast error budget burn detected" |
| 207 | description: "Error budget burning at {{ $value }}x rate" |
| 208 | |
| 209 | # Slow burn: 6x rate, 6 hour window |
| 210 | # Consumes 5% error budget in 6 hours |
| 211 | - alert: SLOErrorBudgetBurnSlow |
| 212 | expr: | |
| 213 | slo:http_availability:burn_rate_6h > 6 |
| 214 | and |
| 215 | slo:http_availability:burn_rate_30m > 6 |
| 216 | for: 15m |
| 217 | labels: |
| 218 | severity: warning |
| 219 | annotations: |
| 220 | summary: "Slow error budget burn detected" |
| 221 | description: "Error budget burning at {{ $value }}x rate" |
| 222 | |
| 223 | # Error budget exhausted |
| 224 | - alert: SLOErrorBudgetExhausted |
| 225 | expr: slo:http_availability:error_budget_remaining < 0 |
| 226 | for: 5m |
| 227 | labels: |
| 228 | severity: critical |
| 229 | annotations: |
| 230 | summary: "SLO error budget exhausted" |
| 231 | description: "Error budget remaining: {{ $value }}%" |
| 232 | ``` |
| 233 | |
| 234 | ## SLO Dashboard |
| 235 | |
| 236 | **Grafana Dashboard Structure:** |
| 237 | |
| 238 | ``` |
| 239 | ┌────────────────────────────────────┐ |
| 240 | │ SLO Compliance (Current) │ |
| 241 | │ ✓ 99.95% (Target: 99.9%) │ |
| 242 | ├────────────────────────────────────┤ |
| 243 | │ Error Budget Remaining: 65% │ |
| 244 | │ ████████░░ 65% │ |
| 245 | ├────────────────────────────────────┤ |
| 246 | │ SLI Trend (28 days) │ |
| 247 | │ [Time series graph] │ |
| 248 | ├────────────────────────────────────┤ |
| 249 | │ Burn Rate Analysis │ |
| 250 | │ [Burn rate by time window] │ |
| 251 | └────────────────────────────────────┘ |
| 252 | ``` |
| 253 | |
| 254 | **Example Queries:** |
| 255 | |
| 256 | ```promql |
| 257 | # Current SLO compliance |
| 258 | sli:http_availability:ratio * 100 |
| 259 | |
| 260 | # Error budget remaining |
| 261 | slo:http_availability:error_budget_remaining |
| 262 | |
| 263 | # Days until error budget exhausted (at current burn rate) |
| 264 | (slo:http_availability:error_budget_remaining / 100) |
| 265 | * |
| 266 | 28 |
| 267 | / |
| 268 | (1 - sli:http_availability:ratio) * (1 - 0.999) |
| 269 | ``` |
| 270 | |
| 271 | ## Additional patterns and templates |
| 272 | |
| 273 | More detailed templates and worked examples live in `references/details.md`. Read that file for the full pattern library. |
| 274 | |
| 275 |
Reviews
Installed this one?Write the first review and take the Trailblazer badge.
Alternatives
Paper Poster (HTML): measurement-gated poster generationDEFAULT poster pipeline — build an academic conference poster (ICML/NeurIPS/ICLR/CVPR/...) as a single HTML/CSS file with measurement-driven hard gates, real paper figures, a two-hue design-token system, and print-ready PDF via headless Chromium. Use when the●····●36/40Brand Monitoring 📡Brand monitoring tool for tracking mentions across social media platforms. Monitor Reddit, Google News, YouTube, and DuckDuckGo for brand mentions. Includes sentiment analysis, trend tracking, crisis detection, and competitor comparison. No API key required fo◐····●34/40Spark Memory & Thermal OpsManage unified memory and thermals during long-running ML jobs on NVIDIA DGX Spark. Use when planning memory headroom for a training run on GB10, when a job OOMs on unified memory, or when monitoring temperature and power during multi-hour training.◐····●32/40Secrets ManagementImplement secure secrets management for CI/CD pipelines using Vault, AWS Secrets Manager, or native platform solutions. Use when handling sensitive credentials, rotating secrets, or securing CI/CD environments.◐····●32/40