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.
| Component | Role |
|---|---|
pyrra api | Web interface and API (port 9099), queries Prometheus |
pyrra kubernetes | Operator: reads ServiceLevelObjective CRDs and creates PrometheusRule objects |
pyrra filesystem | Outside 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 #
| Criterion | Sloth | Pyrra |
|---|---|---|
| Web interface | No (Grafana dashboards) | Yes |
| Kubernetes | Operator + CLI | Operator |
| Outside Kubernetes | CLI that generates files | Filesystem mode |
| Native latency SLI | Free-form queries | Yes (histograms) |
| SLI plugins | Yes (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.
