Command Palette

Search for a command to run...

Назад к скиллам
скилл № 39466

slo-error-budget

Define, compute and review service level indicators, SLO targets and error budgets. Expresses availability, latency, correctness, freshness and throughput…

БесплатноЗапускает вложенные скрипты
Navinspire-iaот Navinspire-ia★ 37 звёзд на GitHub

Установить slo-error-budget в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

SLO and Error Budget

Overview

This skill turns raw good and bad event counts into service level indicators, error budgets, burn rates and alert decisions, and writes the artifacts that make them operational: Prometheus rules, OpenSLO or Sloth specs, an error budget policy and a review report. The default posture is read-only and evidence-based: query the metrics, compute from exported buckets, show the formulas and the series used, and never load alert rules, change an SLO definition or a monitor on a target system without the user's explicit approval.

When it applies

  • A team needs its first SLOs for a service, or wants to check whether an existing target matches reality.
  • An on-call engineer or a release manager asks how much error budget is left and whether the current incident is burning it fast.
  • Alerting must move from static thresholds to burn-rate alerts, or existing burn-rate alerts page too much or too late.
  • SLO definitions must be expressed in OpenSLO, Sloth, Pyrra, Nobl9, Datadog or Grafana SLO, or migrated between them.
  • A monthly SLO review or an error budget policy needs a report with the numbers and the decisions.

Hand over to observability-agent for the incident investigation itself and to sre-incident-responder for incident command.

Engines and sources

Formulas

  • SLI as a ratio: good / total over the window. Each SLI type is defined by what counts as good and what counts as total; the table in references/slo-review-template.md gives the standard choices for availability, latency, correctness, freshness and throughput.
  • Error budget B = 1 - target. Budget consumed C = (1 - SLI) / B; remaining 1 - C. For 99.9% over 30 days the budget is 43.2 minutes of full outage.
  • Burn rate over a span BR(w) = error_ratio(w) / B. Time to exhaustion at a constant burn is window / BR.
  • Multi-window alerts (Google SRE workbook): page at 14.4x over 1h with a 5m short window (2% of the budget in one hour, exhaustion in 50 hours), page at 6x over 6h with 30m (5%, 5 days), ticket at 3x over 1d with 2h (10%, 10 days), ticket at 1x over 3d with 6h (10%, 30 days). Both windows must exceed the threshold. Derivations, detection times and low-traffic adjustments: references/burn-rate-alerts.md.

Prometheus

  • Recording rules slo:sli_error:ratio_rate<window> for 5m, 30m, 1h, 2h, 6h, 1d, 3d, built as 1 - sum(rate(good[w])) / sum(rate(total[w])); slo:error_budget:remaining from increase(...[30d]).
  • Alert rules compare the long and short window series to factor * budget. Validate with promtool check rules and promtool test rules.
  • Latency SLIs use http_request_duration_seconds_bucket{le="0.3"} over _count; the threshold must be an existing bucket boundary.
  • Historical buckets for offline computation come from GET /api/v1/query_range?query=<good or total increase>&start=&end=&step=300 on Prometheus, Thanos or Mimir, or from Grafana through the connectors tool.

Spec and platform formats

  • OpenSLO v1: apiVersion: openslo/v1, kind: SLO, spec.service, spec.indicator.spec.ratioMetric.good|total or thresholdMetric, spec.objectives[].target (0..1), spec.timeWindow[].duration and isRolling, spec.budgetingMethod, spec.alertPolicies.
  • Sloth: version: prometheus/v1, slos[].objective in percent, sli.events.error_query and total_query with {{.window}}, alerting.page_alert and ticket_alert; sloth validate -i slo.yml, sloth generate -i slo.yml -o rules.yml.
  • Pyrra ServiceLevelObjective CRD, Nobl9 sloctl, Datadog POST /api/v1/slo and GET /api/v1/slo/{id}/history, Grafana SLO plugin API. Field tables and examples: references/openslo-sloth.md.

Navin integration

  • Prometheus, Alertmanager, Sloth and Pyrra running in Kubernetes are read through the infra tool at observe level (kubectl get prometheusrule, kubectl get servicelevelobjectives); applying generated rules is a prepare then execute operation that waits for approval.
  • Datadog and Grafana SLOs, Slack delivery of the report, GitHub pull request with the rules: use the connectors tool.
  • DD_API_KEY, DD_APP_KEY, GRAFANA_TOKEN, NOBL9_CLIENT_SECRET stay in environment variables; report presence only.
  • promtool, sloth, oslo missing: install with the toolbelt skill.
  • Large query_range exports and rule files are searched with the grep tool before being read.

Workflow

  1. Define the SLI with the user: service, user journey, good event, total event, exclusions (health checks, 4xx, synthetic traffic). Write the two PromQL selectors (or the equivalent query in the user's platform) and confirm they exist with a query call at observe level.
  2. Export history: run query_range for increase(good[5m]) and increase(total[5m]) over at least the SLO window (30 days at a 5m step is 8640 buckets) and write timestamp,good,total CSV. Thir
Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

  • examples/sli_buckets.csv
  • examples/slo_spec.json
  • references/burn-rate-alerts.md
  • references/openslo-sloth.md
  • references/slo-review-template.md
  • scripts/burn_rate_rules.py
  • scripts/error_budget.py

FAQ

Что делает скилл slo-error-budget?

Define, compute and review service level indicators, SLO targets and error budgets. Expresses availability, latency, correctness, freshness and throughput SLIs as good over total events, computes budget consumed and remaining over rolling or calendar windows, burn rates over 1h, 6h, 1d and 3d, and evaluates the Google SRE multi-window burn-rate alerts. Generates Prometheus recording and alert rules, reads and writes OpenSLO v1 and Sloth specs, maps to Pyrra, Nobl9, Datadog SLOs and Grafana SLO, and produces error budget policies and SLO review reports. Use when the user asks to "define an SLO for this service", "how much error budget is left", "set up burn rate alerts", "generate Prometheus rules for my SLO", "convert this to OpenSLO", or when a reliability review or release freeze decision needs numbers. In French "calculer le budget d'erreur", "definir des SLO", "alertes de burn rate".

Как установить скилл slo-error-budget?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл slo-error-budget запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить slo-error-budget с