Skip to content

SLO Generator

The SLO Generator Wizard provides a guided step-by-step interface for creating new SLOs and generating ready-to-use configuration files for your monitoring stack.

Features

  • Step-by-step wizard — guided form with validation at each step
  • Burn rate presets — pre-configured alert thresholds (2x/1h, 6x/6h, 10x/5m, 20x/30m)
  • Template support — select from built-in service templates to pre-fill the form
  • Config generation — automatically generates OpenSLO YAML, Prometheus alert rules, Alertmanager config, and Grafana dashboards

Accessing the Wizard

Navigate to SLO Management → New SLO in the sidebar, or click SLO Wizard on the SLO list page.

URL: /slos/new

Wizard Steps

Step 1: Service

FieldDescription
Service NameName of the service (e.g. payment-service, api-gateway)
Service DescriptionOptional description of the service
SLO NameName for this SLO (e.g. api-latency, uptime)
SLO DescriptionWhat this SLO measures
TeamSelect the owning team

Step 2: SLO Definition

FieldDescription
Indicator Typeavailability, latency, throughput, or custom
Target (%)SLO target (e.g. 99.9 for 99.9% availability)
Time WindowEvaluation window: 1h, 24h, 7d, 30d, 90d
ThresholdThreshold value (e.g. 200ms for latency)
Metric QueryPromQL expression for the indicator

The metric query field shows contextual help and examples based on the selected indicator type.

Step 3: Alerting

Toggle alerting on/off. When enabled, select one or more burn rate thresholds:

PresetRatePeriodSeverity
2x / 1h2x1hWarning
6x / 6h6x6hWarning
10x / 5m10x5mCritical
20x / 30m20x30mCritical

You can also specify notification channels (e.g. telegram:12345, slack:#alerts).

Step 4: Review

Review the complete configuration before creating the SLO.

Step 5: Done

After creation, you can Download Config Files — a ZIP archive containing:

FileDescription
{service}-{slo}.yamlOpenSLO v1alpha compliant SLO definition
{service}-{slo}-prometheus-alerts.yamlPrometheus alerting rules for burn rate
{service}-{slo}-alertmanager-config.yamlSample Alertmanager routing and receivers
{service}-{slo}-grafana-dashboard.jsonMain SLO Grafana dashboard (burn rate, error budget, alerts)
{service}-{slo}-multi-burnrate-dashboard.jsonMulti-threshold burn rate Grafana dashboard
{service}-{slo}-README.mdSetup instructions and documentation

API Endpoints

Generate SLO

Creates a new SLO from the wizard form data.

http
POST /api/v1/slos/generate

{
  "service_name": "payment-service",
  "slo_name": "api-latency",
  "target": 99.9,
  "time_window": "30d",
  "metric_type": "latency",
  "metric_query": "histogram_quantile(0.95, ...)",
  "threshold": "200ms",
  "team_id": 1,
  "alerting": {
    "enabled": true,
    "burn_rate_thresholds": [
      {"rate": 2, "period": "1h", "severity": "warning"},
      {"rate": 10, "period": "5m", "severity": "critical"}
    ]
  }
}

Response:

json
{
  "id": 42,
  "created_at": "2026-06-17T12:00:00Z",
  "updated_at": "2026-06-17T12:00:00Z"
}

Download Config

Downloads a ZIP archive with generated configuration files for an existing SLO.

http
GET /api/v1/slos/{id}/download

Returns application/zip with Content-Disposition attachment header.

Architecture

The generator is implemented in internal/generators/ and consists of:

ComponentFileDescription
Orchestratorgenerator.goCoordinates all generators, produces ZIP
OpenSLOopenslo.goGenerates OpenSLO v1alpha YAML
Prometheusprometheus.goGenerates Prometheus alerting rules YAML
Alertmanageralertmanager.goGenerates Alertmanager config YAML
Grafanagrafana.goGenerates Grafana dashboard JSON (main + multi-burn-rate)
READMEreadme.goGenerates markdown documentation
Modelsmodels.goShared types for generator configuration

The handler is in internal/handlers/slo.go:

  • GenerateSLO — accepts wizard form, creates SLO in DB, returns SLO ID
  • DownloadConfig — reads SLO from DB, generates configs, returns ZIP