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
| Field | Description |
|---|---|
| Service Name | Name of the service (e.g. payment-service, api-gateway) |
| Service Description | Optional description of the service |
| SLO Name | Name for this SLO (e.g. api-latency, uptime) |
| SLO Description | What this SLO measures |
| Team | Select the owning team |
Step 2: SLO Definition
| Field | Description |
|---|---|
| Indicator Type | availability, latency, throughput, or custom |
| Target (%) | SLO target (e.g. 99.9 for 99.9% availability) |
| Time Window | Evaluation window: 1h, 24h, 7d, 30d, 90d |
| Threshold | Threshold value (e.g. 200ms for latency) |
| Metric Query | PromQL 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:
| Preset | Rate | Period | Severity |
|---|---|---|---|
| 2x / 1h | 2x | 1h | Warning |
| 6x / 6h | 6x | 6h | Warning |
| 10x / 5m | 10x | 5m | Critical |
| 20x / 30m | 20x | 30m | Critical |
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:
| File | Description |
|---|---|
{service}-{slo}.yaml | OpenSLO v1alpha compliant SLO definition |
{service}-{slo}-prometheus-alerts.yaml | Prometheus alerting rules for burn rate |
{service}-{slo}-alertmanager-config.yaml | Sample Alertmanager routing and receivers |
{service}-{slo}-grafana-dashboard.json | Main SLO Grafana dashboard (burn rate, error budget, alerts) |
{service}-{slo}-multi-burnrate-dashboard.json | Multi-threshold burn rate Grafana dashboard |
{service}-{slo}-README.md | Setup instructions and documentation |
API Endpoints
Generate SLO
Creates a new SLO from the wizard form data.
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:
{
"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.
GET /api/v1/slos/{id}/downloadReturns application/zip with Content-Disposition attachment header.
Architecture
The generator is implemented in internal/generators/ and consists of:
| Component | File | Description |
|---|---|---|
| Orchestrator | generator.go | Coordinates all generators, produces ZIP |
| OpenSLO | openslo.go | Generates OpenSLO v1alpha YAML |
| Prometheus | prometheus.go | Generates Prometheus alerting rules YAML |
| Alertmanager | alertmanager.go | Generates Alertmanager config YAML |
| Grafana | grafana.go | Generates Grafana dashboard JSON (main + multi-burn-rate) |
| README | readme.go | Generates markdown documentation |
| Models | models.go | Shared types for generator configuration |
The handler is in internal/handlers/slo.go:
GenerateSLO— accepts wizard form, creates SLO in DB, returns SLO IDDownloadConfig— reads SLO from DB, generates configs, returns ZIP