Skip to main content
Version: 2.0

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​

TermMeaning
SLIGood events divided by all events, between 0 and 1.
TargetThe SLI promised over the window, for example 0.995 over 30 days.
Error budget1 − 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."
}
  • type is a label: availability, latency, error_rate or throughput.
  • 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​

SLOTargetSource
Platform API availability99.5%ingress kubeopera-backend, non-5xx
Platform API latency95% within 1 singress kubeopera-backend duration histogram
Sign-in availability99.9%ingress authapi
Dashboard availability99.5%ingress kubeopera-frontend
GitOps reconciles99%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​

SeverityCondition
CriticalBurn rate ≥ 14.4 over both 1h and 5m
HighBurn 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.

MethodPathDescription
GET · POST/api/v1/slosList or create SLOs.
GET · PUT · DELETE/api/v1/slos/{id}One SLO.
GET/api/v1/slos/{id}/statusSLI, 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/summaryCounts by status, with every SLO's status.
GET/healthzHealth check.

Configuration​

VariableDefaultDescription
DATABASE_URL(required)PostgreSQL. The service won't start without it.
PROMETHEUS_URLhttp://localhost:9090Prometheus.
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.
PORT8100HTTP port.