Skip to content

srekit slo

Generate an SLO / SLI document for a service: objective, window, latency budget, with an embedded PromQL example.

Synopsis

srekit slo --service NAME [flags]

Flags

Flag Required Description
--service yes Service name
--target no SLO target (e.g. 99.9%). Default: 99.9%
--window no Rolling window (e.g. 30d). Default: 30d
--latency no Latency budget (e.g. 300ms). Default: 300ms

Plus the shared output flags. Default filename: slo-<slug-of-service>.md.

Examples

Defaults:

srekit slo --service api-gw --stdout

Tighter target, longer window:

srekit slo --service api-gw --target 99.95% --window 90d --latency 250ms \
  --out slo-api-gw.md

Section structure

Section headings render bilingually — Russian, with the English term in parentheses. Below they are given by stable id and English term; srekit slo --service X --json | jq -r '.sections[].title' prints them as they appear in the document.

  • Front matter: id, creation_date, modification_date, type: slo, service, tags
  • sli_definition — SLI definition: success ratio and latency percentile, with the PromQL pre-rendered from the service / window / latency values
  • slo_target — SLO target
  • error_budget — Error budget
  • consequences_of_budget_exhaustion — Consequences of budget exhaustion: the hand-off point to srekit ebp
  • dependencies — Dependencies
  • review_cadence — Review cadence
  • references — References

Template shape

slo ships as a v1 YAML artifact (internal/tmpl/templates/slo.yaml) — frontmatter, H1, meta_bullets, sections (sli_definition, slo_target, error_budget, consequences_of_budget_exhaustion, dependencies, review_cadence, references). Template expressions reference .Meta.<Field> for ID, Service, Target, Window, LatencyTarget, Now. See srekit postmortem for the full schema reference.

See also

  • srekit ebp — error budget policy that operationalizes this SLO.
  • srekit runbook — what to do when burn alerts fire.