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

  • Front matter: title, service, target, window, id
  • Сервис (Service)
  • SLI / SLO definitions (success ratio, latency percentile)
  • PromQL example — pre-rendered with the service / window / latency values
  • Бюджет ошибок (Error budget)
  • Связанные документы (Related docs) — links to runbook, EBP, capacity

Template shape

slo ships as a v1 YAML artifact (internal/tmpl/templates/slo.yaml) — frontmatter, H1, meta_bullets, sections covering the SLI/SLO definition, error budget, and related-docs links. 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.