SLO vs SLA: Understanding the Difference
Best practice is to define SLOs that are more stringent than SLAs. If your SLA guarantees 99.9%, set the SLO at 99.95%. This creates a safety margin (internal error budget) that allows detecting degradations before the SLA is violated.
ServiceLevelObjective CRD
TheServiceLevelObjective defines a reliability target for a service, with alerts based on burn rate and error budget tracking.
Spec Fields
Root
SLOIndicator
Defines what to measure. Thetype determines the semantics and required Prometheus queries.
Indicator types:
PrometheusQuerySpec:
- Availability
- Latency (P99 under 500ms)
- Error Rate
- Custom (Throughput)
SLOTarget
BurnRateWindow
Each entry defines an alert window based on burn rate.SLOAlertPolicy
How the Calculation Works (Google SRE Model)
The system implements the multi-window, multi-burn-rate alerting model described in Googleโs โSite Reliability Engineeringโ book.Error Budget
The error budget is the maximum amount of โerrorโ allowed within the SLO window.Burn Rate
The burn rate indicates how fast the error budget is being consumed.1
Calculate error rate in the window
Using the Prometheus queries, the ratio of good events vs total in the specified window is calculated.
2
Calculate burn rate
Divide the error rate by the error budget.
3
Verify multi-window
To trigger an alert, BOTH windows (short AND long) must exceed the threshold.
4
Classify and notify
Based on the configured severity, the alert is routed to the corresponding
NotificationPolicy.Multi-Window Alerting: Default Thresholds
The default thresholds follow Google SREโs recommendation for a 30-day SLO:Complete Numerical Example
Consider a 99.9% availability SLO over 30 days for theapi-gateway service:
Error Budget Tracking
TheServiceLevelObjective status is periodically updated by the reconciler:
SLO Conditions:
Budget Warning Thresholds:
When configured, the system sends notifications upon reaching each threshold:
IncidentSLA CRD
TheIncidentSLA defines response and resolution time contracts by severity, with business hours support and violation tracking.
Spec Fields
Root
ResponseTimeConfig
Response time is measured as the time between Issue creation (state
Detected) and the first transition to Analyzing or Remediating. Resolution time is measured between Detected and Resolved.BusinessHoursSpec
How the Business Hours Clock Works
The SLA clock only counts during business hours. Outside of business hours, the clock is automatically paused.1
Incident detected
Issue created at 17:45 (Friday). Clock starts.
2
Clock counts 15 minutes (Friday)
From 17:45 to 18:00 = 15 minutes of SLA clock.
Clock pauses at 18:00 (end of business hours).
3
Weekend: clock paused
All of Saturday and Sunday: clock remains paused.
Accumulated SLA time: 15 minutes.
4
Monday: clock resumes
Clock resumes at 09:00 on Monday.
If the incident is resolved at 10:30 on Monday:
- Friday: 15 minutes
- Monday: 1h30 = 90 minutes
- Total SLA: 105 minutes (1h45)
5
Compliance evaluation
For
critical severity with maxResolutionTime: 1h:- SLA time spent: 1h45 = 105 minutes
- Limit: 60 minutes
- VIOLATION: exceeded by 45 minutes
high severity with maxResolutionTime: 4h:- SLA time spent: 105 minutes
- Limit: 240 minutes
- WITHIN SLA
ViolationPolicySpec
CompliancePercentage Calculation
Complete YAML Examples
99.9% Availability SLO with Burn Rate Alerting
SLA P1=5min Response / 1h Resolution (Business Hours)
For
critical severity, even with business hours enabled, consider creating a separate rule with businessHours.enabled: false. P1 issues typically require 24/7 response.SLO with Custom PrometheusQuery (Latency P99)
Grafana Dashboards
The AIOps platform provides 4 pre-configured Grafana dashboards for SLO and SLA visualization:SLO Overview
Unified panel with all SLOs, current values, remaining error budget, and burn rate. Includes a burn rate heatmap by service.
Error Budget Burn-Down
Error budget burn-down chart over time. Shows trends and exhaustion projections. Reference lines for each warning threshold.
SLA Compliance Report
Compliance report by severity and period. Table with each incident, response/resolution times, and compliance status. Exportable to PDF.
Incident Timeline
Incident timeline with detection, analysis, remediation, and resolution. Visual correlation with SLO burn rate and SLA clock.
Prometheus Metrics
The SLO and SLA system exposes detailed metrics:SLO Metrics
SLA Metrics
Recommended Prometheus alerts:
Next Steps
Notifications and Escalation
Multi-channel notification system and automatic escalation
Approval Workflow
Change control with approval policies and blast radius
AIOps Platform
Deep-dive into the AIOps architecture
K8s Operator
Operator configuration and CRDs