RousselTMLEARNING

Observability

Managing SLOs with Pyrra

Pyrra: define availability and latency SLOs as Kubernetes CRDs or files, generate Prometheus rules and track budgets and burn rates in its web interface.

1. Pyrra in brief #

A generator with an interface.

Components #

Pyrra does the same job as Sloth (multi-window rules and burn rate alerts) and adds a web interface that lists all SLOs, their remaining budget and their graphs, with no dashboard to import.

ComponentRole
pyrra apiWeb interface and API (port 9099), queries Prometheus
pyrra kubernetesOperator: reads ServiceLevelObjective CRDs and creates PrometheusRule objects
pyrra filesystemOutside Kubernetes: reads YAML files and writes rule files for Prometheus

2. Defining SLOs #

Availability and latency.

Availability #

apiVersion: pyrra.dev/v1alpha1
kind: ServiceLevelObjective
metadata:
  name: checkout-errors
  namespace: monitoring
  labels: { prometheus: k8s, role: alert-rules }
spec:
  target: "99.9"
  window: 4w
  description: Requêtes de checkout sans erreur 5xx.
  indicator:
    ratio:
      errors:
        metric: http_requests_total{service="checkout", code=~"5.."}
      total:
        metric: http_requests_total{service="checkout"}

Latency #

spec:
  target: "99"
  window: 4w
  indicator:
    latency:
      success:
        metric: http_request_duration_seconds_bucket{service="checkout", le="0.3"}
      total:
        metric: http_request_duration_seconds_count{service="checkout"}
Good to know: With grouping: [route], Pyrra computes one SLO per label value (one row per route in the interface), from a single definition.

3. Sloth or Pyrra? #

Two good choices.

Comparison #

CriterionSlothPyrra
Web interfaceNo (Grafana dashboards)Yes
KubernetesOperator + CLIOperator
Outside KubernetesCLI that generates filesFilesystem mode
Native latency SLIFree-form queriesYes (histograms)
SLI pluginsYes (SLI library)No

Commercial offerings from Grafana (Grafana Cloud SLO), Datadog, Dynatrace or Nobl9 provide equivalent built-in features. The concepts (ratio SLI, windows, burn rate) remain identical.

Related articles

Time-based vs event-based SLO: understanding, computing and choosing (with the Qonto example)

Differences between time-based SLOs (time slices, uptime) and event-based SLOs (good events over total): defi…

Chaos engineering: principles, tools and practice with SLOs

A complete guide to chaos engineering: principles, steady state and hypothesis, blast radius, link with SLOs …

SRE: SLI, SLO and SLA explained simply

The fundamentals of Site Reliability Engineering (SRE): the difference between SLI, SLO and SLA, choosing ind…

Keep learning

Support us

♥ SUPPORT US

Support RousselTM Learning

Courses, articles, labs and certificates stay free with no intrusive ads. A voluntary contribution, of any amount you choose, pays for hosting, lab environments and new content.

Contribute with PayPal Any amount · card or PayPal accountLearn more
QR code PayPal
Or scan this QR code with your phone

Thank you, every contribution counts!