SLO Manager
Service: slo-manager · Port: 8100 · Database schema: slos · Access: platform staff (super_admin) only
slo-manager tracks the platform's own service level objectives: kubeopera-api, sign-in, the dashboard and GitOps. It evaluates them against Prometheus, reports error budget and burn rates, and alerts on-call.
Tenants' SLOs for their apps are not here. kubeopera-api serves those from /cloudspaces/{id}/monitoring/slos, scoped to the tenant (see SLOs and APM for your apps). slo-manager runs PromQL as written over every tenant's data, so it refuses anyone who isn't platform staff.
Key ideas
| Term | Meaning |
|---|---|
| SLI | Good events divided by all events, between 0 and 1. |
| Target | The SLI promised over the window, for example 0.995 over 30 days. |
| Error budget | 1 − target. The status reports the share left, below 0 once overspent. |
| Burn rate | (1 − SLI) / (1 − target). 1 uses the budget exactly over the window. |
Defining an SLO
Give a pair of counter queries with $__window where the range goes. slo-manager substitutes the SLO window for the SLI, and 5m, 30m, 1h and 6h for burn rates:
{
"name": "Platform API availability",
"service": "kubeopera-api",
"namespace": "kubeopera-core",
"type": "availability",
"target": 0.995,
"window_days": 30,
"good_query": "sum(increase(nginx_ingress_controller_requests{exported_namespace=\"kubeopera-core\",ingress=\"kubeopera-backend\",status!~\"5..\"}[$__window]))",
"total_query": "sum(increase(nginx_ingress_controller_requests{exported_namespace=\"kubeopera-core\",ingress=\"kubeopera-backend\"}[$__window]))",
"description": "Requests to kubeopera-api that did not fail with a 5xx, at the ingress."
}
typeis a label:availability,latency,error_rateorthroughput.- An older SLO may use
prom_query, a single query that returns the SLI. It works without short-window burn rates or alerts. - No traffic gives
no_data, not 0%.
Seeded SLOs
| SLO | Target | Source |
|---|---|---|
| Platform API availability | 99.5% | ingress kubeopera-backend, non-5xx |
| Platform API latency | 95% within 1 s | ingress kubeopera-backend duration histogram |
| Sign-in availability | 99.9% | ingress authapi |
| Dashboard availability | 99.5% | ingress kubeopera-frontend |
| GitOps reconciles | 99% | controller_runtime_reconcile_total in flux-system, non-error |
The GitOps SLO needs the Flux controllers scraped (PodMonitor flux-system). Flux 2.7 no longer exports gotk_reconcile_condition.
Burn alerts to on-call
| Severity | Condition |
|---|---|
| Critical | Burn rate ≥ 14.4 over both 1h and 5m |
| High | Burn rate ≥ 6 over both 6h and 30m |
Alerts go to ONCALL_EMAILS through zenia and/or to ONCALL_SLACK_WEBHOOK_URL, at most once per SLO per severity every 6 hours. With neither set, they are only logged.
REST API
All routes under /api/v1/slos need a super_admin token.
| Method | Path | Description |
|---|---|---|
GET · POST | /api/v1/slos | List or create SLOs. |
GET · PUT · DELETE | /api/v1/slos/{id} | One SLO. |
GET | /api/v1/slos/{id}/status | SLI, budget left, burn over the window, 1h and 6h, and status. |
GET | /api/v1/slos/{id}/history?days= | Hourly evaluations, up to 90 days. |
GET | /api/v1/slos/summary | Counts by status, with every SLO's status. |
GET | /healthz | Health check. |
Configuration
| Variable | Default | Description |
|---|---|---|
DATABASE_URL | (required) | PostgreSQL. The service won't start without it. |
PROMETHEUS_URL | http://localhost:9090 | Prometheus. |
JWT_SECRET or AUTH_JWT_ACCESS_SECRET | (required) | Validates tokens. |
XENIA_BASE_URL | — | zenia's notifications API, for on-call email. |
ONCALL_EMAILS | — | Comma-separated on-call addresses. |
ONCALL_SLACK_WEBHOOK_URL | — | Slack incoming webhook. |
CORS_ALLOWED_ORIGINS | — | Browser origins allowed to call it directly. |
PORT | 8100 | HTTP port. |