Purpose & When-To-Use
Trigger conditions:
- Existing SLO definition needs validation against actual service performance
- SRE team requires automated alerting on error budget consumption
- Compliance audit demands proof of SLO adherence over time period
- Incident postmortem reveals SLO was breached but no alerts fired
- Service migration requires SLO re-validation with new infrastructure
- Multi-window burn rate alerts needed (fast/slow burn detection)
- Dashboard generation needed for executive SLO reporting
Use this skill when you have an existing SLO definition and need to validate it against real metrics, generate appropriate alerting rules with burn rate thresholds, and create compliance reports or monitoring dashboards.
Pre-Checks
Before execution, verify:
- Time normalization:
NOW_ET = 2025-10-26T03:51:54-04:00 (NIST/time.gov semantics, America/New_York)
- Input schema validation:
slo_definition contains target, window, and sli_query fields
metrics_source is one of: prometheus, cloudwatch, datadog, newrelic
time_window is valid duration: 7d, 28d, or 90d (default: 28d)
error_budget_policy is one of: strict, moderate, flexible (default: moderate)
- Source freshness: All cited sources (Google SRE Workbook, Prometheus docs, Sloth) accessed on
NOW_ET
- Metrics availability: Target metrics platform is accessible and contains historical data for
time_window
Abort conditions:
- SLO definition missing required fields (
target, window, sli_query)
- Metrics source unavailable or lacks data for validation period
- SLI query syntax invalid for specified metrics platform
- Historical data gap >10% of validation window (insufficient for accurate validation)
Procedure
Tier 1 (Fast Path)
Token budget: T1 ≤2k tokens
Scope: Basic SLO validation for common availability/latency targets with simple alerting.
Steps:
Parse SLO definition:
- Extract
target (e.g., 99.9%), window (e.g., 30d), sli_query (metrics query)
- Validate query syntax for
metrics_source platform
- Calculate error budget:
error_budget = (1 - target) * window
- Example: 99.9% over 30d = 43.2 minutes allowed downtime
Query metrics platform (accessed 2025-10-26T03:51:54-04:00: https://prometheus.io/docs/prometheus/latest/querying/basics/):
- Execute
sli_query over time_window (default 28d)
- Calculate actual SLO achievement:
actual_slo = avg(sli_results)
- Identify breach periods: timestamps where SLI < target
Compute error budget status:
consumed_budget = (1 - actual_slo) * window
remaining_budget = error_budget - consumed_budget
compliance = (consumed_budget <= error_budget) ? "PASS" : "FAIL"
Generate basic alert rule (Prometheus example):
- alert: SLOBudgetExhausted
expr: (1 - sli_query) > (1 - 0.999)
for: 5m
labels:
severity: critical
annotations:
summary: "Error budget exhausted"
Output: Validation report (pass/fail), current budget status, basic alert rule
Tier 2 (Extended Validation)
Token budget: T2 ≤6k tokens
Scope: Production SLO validation with multi-window burn rate alerts and compliance reporting.
Steps:
Multi-window SLO validation (accessed 2025-10-26T03:51:54-04:00: https://sre.google/workbook/implementing-slos/):
- Validate SLO over multiple time windows: 7d, 28d, 90d
- Calculate compliance for each window independently
- Identify short-term degradation (7d breach) vs long-term trends (90d)
- Generate breach timeline: all periods where SLI fell below target
Burn rate calculation (accessed 2025-10-26T03:51:54-04:00: https://sre.google/workbook/alerting-on-slos/):
- Fast burn (1-hour window): Detects rapid error budget consumption
- Threshold: 14.4x normal burn rate for 99.9% SLO
- Formula:
(1 - sli_1h) > 14.4 * (1 - target)
- Medium burn (6-hour window): Detects moderate degradation
- Threshold: 6x normal burn rate
- Formula:
(1 - sli_6h) > 6 * (1 - target)
- Slow burn (3-day window): Detects gradual degradation
- Threshold: 1x normal burn rate (budget exhaustion in 30 days)
- Formula:
(1 - sli_3d) > 1 * (1 - target)
Error budget policy enforcement (based on error_budget_policy parameter):
- Strict: Alert when >75% budget consumed, freeze deploys at >90%
- Moderate: Alert when >85% budget consumed, freeze deploys at >95%
- Flexible: Alert when >90% budget consumed, no automatic freeze
Platform-specific alerting rules generation:
Prometheus (accessed 2025-10-26T03:51:54-04:00: https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules/):
groups:
- name: slo_alerts
interval: 30s
rules:
- alert: SLOFastBurn
expr: |
(1 - (sum(rate(http_requests_total{status!~"5.."}[1h]))
/ sum(rate(http_requests_total[1h]))))
> (14.4 * (1 - 0.999))
for: 2m
labels:
severity: critical
annotations:
summary: "Fast burn: error budget will exhaust in 2 hours"
- alert: SLOSlowBurn
expr: |
(1 - (sum(rate(http_requests_total{status!~"5.."}[3d]))
/ sum(rate(http_requests_total[3d]))))
> (1 * (1 - 0.999))
for: 15m
labels:
severity: warning
annotations:
summary: "Slow burn: error budget will exhaust in 30 days"
CloudWatch:
{
"AlarmName": "SLO-FastBurn-API",
"ComparisonOperator": "GreaterThanThreshold",
"EvaluationPeriods": 2,
"MetricName": "ErrorRate",
"Namespace": "AWS/ApplicationELB",
"Period": 3600,
"Statistic": "Average",
"Threshold": 0.0144,
"ActionsEnabled": true,
"AlarmActions": ["arn:aws:sns:us-east-1:123456789:critical-alerts"]
}
Dashboard configuration (accessed 2025-10-26T03:51:54-04:00: https://github.com/slok/sloth):
- Panel 1: SLO compliance gauge (current achievement vs target)
- Panel 2: Error budget remaining (time-series graph)
- Panel 3: Burn rate by window (1h, 6h, 3d stacked graph)
- Panel 4: Breach timeline (heatmap showing SLO violations)
- Panel 5: Time to budget exhaustion (calculated metric)
Grafana example (using Sloth format):
version: "prometheus/v1"
service: "api-service"
slos:
- name: "availability"
objective: 99.9
sli:
events:
error_query: sum(rate(http_requests_total{status=~"5.."}[{{.window}}]))
total_query: sum(rate(http_requests_total[{{.window}}]))
alerting:
name: "API SLO"
page_alert:
labels:
severity: critical
ticket_alert:
labels:
severity: warning
Compliance audit report:
- Summary: Overall SLO compliance (PASS/FAIL) for each time window
- Breach details: Start/end timestamps, duration, root cause (if known)
- Budget consumption: Total consumed, remaining, projected exhaustion date
- Alerting effectiveness: Were alerts fired during breach periods?
- Recommendations: SLO adjustment suggestions based on historical performance
Comprehensive output:
- Multi-window validation report with breach timeline
- Platform-specific alerting rules (Prometheus/CloudWatch/Datadog)
- Error budget status with burn rate metrics
- Dashboard configuration (Grafana/CloudWatch JSON)
- Compliance audit report
Sources cited (accessed 2025-10-26T03:51:54-04:00):
Tier 3 (Deep Analysis)
Token budget: T3 ≤12k tokens
Scope: Advanced SLO validation with anomaly detection, trend analysis, and automated remediation recommendations.
Steps:
Historical trend analysis:
- Analyze SLO performance over extended period (90d, 180d, 1y)
- Identify seasonality patterns (weekday/weekend, business hours, holidays)
- Calculate baseline SLO achievement by time period
- Detect anomalous degradation periods (statistical outliers)
SLO sensitivity analysis:
- Simulate impact of SLO target adjustments (e.g., 99.9% → 99.95%)
- Calculate required infrastructure improvements to meet tighter SLOs
- Estimate cost of achieving higher reliability (additional resources, redundancy)
Multi-service dependency analysis:
- Identify upstream/downstream service dependencies
- Calculate composite SLO (product of dependent service SLOs)
- Example: If Service A (99.9%) depends on Service B (99.95%), composite = 99.85%
- Recommend SLO targets for dependencies to achieve overall target
Automated remediation recommendations:
- Analyze breach root causes from incident reports/logs
- Generate prioritized backlog of reliability improvements
- Estimate error budget recovery timeline for each improvement
- Link to related runbooks/playbooks for common failure modes
Advanced alerting strategies:
- Adaptive thresholds: Adjust burn rate thresholds based on time-of-day/day-of-week patterns
- Multi-burn-rate windows: Combine multiple windows (e.g., 1h AND 6h) to reduce false positives
- Budget forecasting: Predict budget exhaustion based on current burn rate trends
Comprehensive SLO evaluation:
- Generate executive summary report with visualizations
- Provide SLO tuning recommendations (target too strict/loose?)
- Include cost/benefit analysis of SLO improvements
- Export results to common formats (PDF, Excel, JSON)
Decision Rules
SLO compliance determination:
- PASS: Actual SLO ≥ target for all evaluated time windows
- FAIL: Actual SLO < target for any evaluated time window
- WARNING: Within 5% of error budget exhaustion (trigger proactive review)
Burn rate alert severity mapping:
- Critical (page): Fast burn (1h) consuming >2% of 30-day budget
- Warning (ticket): Medium burn (6h) consuming >5% of 30-day budget
- Info (notification): Slow burn (3d) consuming >10% of 30-day budget
Dashboard generation strategy:
- Prometheus metrics: Use Grafana with Sloth-generated dashboards
- CloudWatch metrics: Use native CloudWatch dashboards
- Datadog metrics: Use Datadog SLO UI with custom widgets
- Multi-platform: Generate platform-agnostic JSON schema, manual import required
Ambiguity thresholds:
- If
slo_definition lacks window → default to 30d (SRE standard)
- If
error_budget_policy not specified → default to moderate
- If metrics have >10% data gaps → issue warning, proceed with available data
- If SLO target >99.99% → issue warning about feasibility
Abort/stop conditions:
- Metrics query returns zero results (invalid query or no data)
- SLO definition malformed (missing required fields)
- Metrics platform authentication/access fails
- Historical data coverage <50% of validation window
Output Contract
Required fields:
{
"validation_report": {
"slo_name": "string",
"target": "number (e.g., 99.9)",
"windows": [
{
"period": "string (7d, 28d, 90d)",
"actual_slo": "number (achieved %)",
"compliance": "PASS | FAIL | WARNING",
"error_budget_total": "number (minutes)",
"error_budget_consumed": "number (minutes)",
"error_budget_remaining": "number (minutes)",
"breach_count": "number",
"breach_timeline": [
{
"start": "ISO8601 timestamp",
"end": "ISO8601 timestamp",
"duration_minutes": "number",
"severity": "critical | warning"
}
]
}
],
"overall_compliance": "PASS | FAIL"
},
"alerting_rules": {
"platform": "string (prometheus | cloudwatch | datadog)",
"format": "yaml | json",
"rules": "string (platform-specific alert definitions)"
},
"error_budget_status": {
"current_burn_rate_1h": "number (multiplier, e.g., 14.4x)",
"current_burn_rate_6h": "number",
"current_burn_rate_3d": "number",
"time_to_exhaustion": "string (e.g., '2 hours' | '15 days' | 'N/A')",
"budget_policy_triggered": "boolean",
"recommended_action": "freeze_deploys | monitor_closely | continue_normal_operations"
},
"dashboard_config": {
"platform": "string (grafana | cloudwatch | datadog)",
"format": "json | yaml",
"config": "object (platform-specific dashboard definition)"
}
}
Optional fields:
trend_analysis: Historical SLO performance trends (T3 only)
remediation_recommendations: Prioritized reliability improvements (T3 only)
compliance_audit: Detailed audit report with breach analysis
Validation:
- All time windows must have
compliance status
- Burn rate calculations must use correct multipliers for target SLO
- Dashboard config must be valid JSON/YAML for target platform
- Alert rules must be syntactically correct for metrics platform
Examples
Input:
{
"slo_definition": {
"name": "API Availability",
"target": 99.9,
"window": "30d",
"sli_query": "sum(rate(http_requests_total{status!~\"5..\"}[5m])) / sum(rate(http_requests_total[5m]))"
},
"metrics_source": "prometheus",
"time_window": "28d",
"error_budget_policy": "moderate"
}
Output (abbreviated):
{
"validation_report": {
"slo_name": "API Availability",
"target": 99.9,
"windows": [{
"period": "28d",
"actual_slo": 99.87,
"compliance": "FAIL",
"error_budget_consumed": 52.4,
"error_budget_remaining": -12.2,
"breach_count": 3
}],
"overall_compliance": "FAIL"
},
"error_budget_status": {
"current_burn_rate_1h": 2.1,
"time_to_exhaustion": "N/A (budget exhausted)"
}
}
Quality Gates
Token budgets:
- T1: ≤2k tokens for basic SLO validation with simple alerting
- T2: ≤6k tokens for multi-window validation with burn rate alerts and dashboards
- T3: ≤12k tokens for trend analysis, remediation recommendations, and advanced reporting
Safety requirements:
- Validate metrics queries are read-only (no writes to metrics platform)
- Warn if SLO breach detected but no historical incidents recorded
- Ensure alert rules don't create excessive notification volume (>10 alerts/day = review needed)
Auditability:
- All validation results include query timestamps and data sources
- Breach timeline provides exact start/end times for compliance review
- Alert rules are version-controlled and reproducible
Determinism:
- Same SLO definition + metrics data produces identical validation report
- Burn rate calculations use standard formulas from Google SRE literature
- Error budget math is transparent and auditable
Resources
Primary sources:
Reference implementations:
Additional reading:
1---2name: service-level-objective-validator3description: Validate SLO definitions against actual metrics, generate alerting rules, and design error budget policies with burn rate calculations.4license: MIT5---67## Purpose & When-To-Use89**Trigger conditions:**1011- Existing SLO definition needs validation against actual service performance12- SRE team requires automated alerting on error budget consumption13- Compliance audit demands proof of SLO adherence over time period14- Incident postmortem reveals SLO was breached but no alerts fired15- Service migration requires SLO re-validation with new infrastructure16- Multi-window burn rate alerts needed (fast/slow burn detection)17- Dashboard generation needed for executive SLO reporting1819**Use this skill when** you have an existing SLO definition and need to validate it against real metrics, generate appropriate alerting rules with burn rate thresholds, and create compliance reports or monitoring dashboards.2021---2223## Pre-Checks2425**Before execution, verify:**26271. **Time normalization**: `NOW_ET = 2025-10-26T03:51:54-04:00` (NIST/time.gov semantics, America/New_York)282. **Input schema validation**:29 - `slo_definition` contains `target`, `window`, and `sli_query` fields30 - `metrics_source` is one of: `prometheus`, `cloudwatch`, `datadog`, `newrelic`31 - `time_window` is valid duration: `7d`, `28d`, or `90d` (default: `28d`)32 - `error_budget_policy` is one of: `strict`, `moderate`, `flexible` (default: `moderate`)333. **Source freshness**: All cited sources (Google SRE Workbook, Prometheus docs, Sloth) accessed on `NOW_ET`344. **Metrics availability**: Target metrics platform is accessible and contains historical data for `time_window`3536**Abort conditions:**3738- SLO definition missing required fields (`target`, `window`, `sli_query`)39- Metrics source unavailable or lacks data for validation period40- SLI query syntax invalid for specified metrics platform41- Historical data gap >10% of validation window (insufficient for accurate validation)4243---4445## Procedure4647### Tier 1 (Fast Path)4849**Token budget**: T1 ≤2k tokens5051**Scope**: Basic SLO validation for common availability/latency targets with simple alerting.5253**Steps:**54551. **Parse SLO definition**:56 - Extract `target` (e.g., 99.9%), `window` (e.g., 30d), `sli_query` (metrics query)57 - Validate query syntax for `metrics_source` platform58 - Calculate error budget: `error_budget = (1 - target) * window`59 - Example: 99.9% over 30d = 43.2 minutes allowed downtime60612. **Query metrics platform** (accessed 2025-10-26T03:51:54-04:00: https://prometheus.io/docs/prometheus/latest/querying/basics/):62 - Execute `sli_query` over `time_window` (default 28d)63 - Calculate actual SLO achievement: `actual_slo = avg(sli_results)`64 - Identify breach periods: timestamps where SLI < target65663. **Compute error budget status**:67 - `consumed_budget = (1 - actual_slo) * window`68 - `remaining_budget = error_budget - consumed_budget`69 - `compliance = (consumed_budget <= error_budget) ? "PASS" : "FAIL"`70714. **Generate basic alert rule** (Prometheus example):72 ```yaml73 - alert: SLOBudgetExhausted74 expr: (1 - sli_query) > (1 - 0.999)75 for: 5m76 labels:77 severity: critical78 annotations:79 summary: "Error budget exhausted"80 ```81825. **Output**: Validation report (pass/fail), current budget status, basic alert rule8384---8586### Tier 2 (Extended Validation)8788**Token budget**: T2 ≤6k tokens8990**Scope**: Production SLO validation with multi-window burn rate alerts and compliance reporting.9192**Steps:**93941. **Multi-window SLO validation** (accessed 2025-10-26T03:51:54-04:00: https://sre.google/workbook/implementing-slos/):95 - Validate SLO over multiple time windows: 7d, 28d, 90d96 - Calculate compliance for each window independently97 - Identify short-term degradation (7d breach) vs long-term trends (90d)98 - Generate breach timeline: all periods where SLI fell below target991002. **Burn rate calculation** (accessed 2025-10-26T03:51:54-04:00: https://sre.google/workbook/alerting-on-slos/):101 - **Fast burn** (1-hour window): Detects rapid error budget consumption102 - Threshold: 14.4x normal burn rate for 99.9% SLO103 - Formula: `(1 - sli_1h) > 14.4 * (1 - target)`104 - **Medium burn** (6-hour window): Detects moderate degradation105 - Threshold: 6x normal burn rate106 - Formula: `(1 - sli_6h) > 6 * (1 - target)`107 - **Slow burn** (3-day window): Detects gradual degradation108 - Threshold: 1x normal burn rate (budget exhaustion in 30 days)109 - Formula: `(1 - sli_3d) > 1 * (1 - target)`1101113. **Error budget policy enforcement** (based on `error_budget_policy` parameter):112 - **Strict**: Alert when >75% budget consumed, freeze deploys at >90%113 - **Moderate**: Alert when >85% budget consumed, freeze deploys at >95%114 - **Flexible**: Alert when >90% budget consumed, no automatic freeze1151164. **Platform-specific alerting rules generation**:117118 **Prometheus** (accessed 2025-10-26T03:51:54-04:00: https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules/):119 ```yaml120 groups:121 - name: slo_alerts122 interval: 30s123 rules:124 - alert: SLOFastBurn125 expr: |126 (1 - (sum(rate(http_requests_total{status!~"5.."}[1h]))127 / sum(rate(http_requests_total[1h]))))128 > (14.4 * (1 - 0.999))129 for: 2m130 labels:131 severity: critical132 annotations:133 summary: "Fast burn: error budget will exhaust in 2 hours"134135 - alert: SLOSlowBurn136 expr: |137 (1 - (sum(rate(http_requests_total{status!~"5.."}[3d]))138 / sum(rate(http_requests_total[3d]))))139 > (1 * (1 - 0.999))140 for: 15m141 labels:142 severity: warning143 annotations:144 summary: "Slow burn: error budget will exhaust in 30 days"145 ```146147 **CloudWatch**:148 ```json149 {150 "AlarmName": "SLO-FastBurn-API",151 "ComparisonOperator": "GreaterThanThreshold",152 "EvaluationPeriods": 2,153 "MetricName": "ErrorRate",154 "Namespace": "AWS/ApplicationELB",155 "Period": 3600,156 "Statistic": "Average",157 "Threshold": 0.0144,158 "ActionsEnabled": true,159 "AlarmActions": ["arn:aws:sns:us-east-1:123456789:critical-alerts"]160 }161 ```1621635. **Dashboard configuration** (accessed 2025-10-26T03:51:54-04:00: https://github.com/slok/sloth):164 - **Panel 1**: SLO compliance gauge (current achievement vs target)165 - **Panel 2**: Error budget remaining (time-series graph)166 - **Panel 3**: Burn rate by window (1h, 6h, 3d stacked graph)167 - **Panel 4**: Breach timeline (heatmap showing SLO violations)168 - **Panel 5**: Time to budget exhaustion (calculated metric)169170 Grafana example (using Sloth format):171 ```yaml172 version: "prometheus/v1"173 service: "api-service"174 slos:175 - name: "availability"176 objective: 99.9177 sli:178 events:179 error_query: sum(rate(http_requests_total{status=~"5.."}[{{.window}}]))180 total_query: sum(rate(http_requests_total[{{.window}}]))181 alerting:182 name: "API SLO"183 page_alert:184 labels:185 severity: critical186 ticket_alert:187 labels:188 severity: warning189 ```1901916. **Compliance audit report**:192 - **Summary**: Overall SLO compliance (PASS/FAIL) for each time window193 - **Breach details**: Start/end timestamps, duration, root cause (if known)194 - **Budget consumption**: Total consumed, remaining, projected exhaustion date195 - **Alerting effectiveness**: Were alerts fired during breach periods?196 - **Recommendations**: SLO adjustment suggestions based on historical performance1971987. **Comprehensive output**:199 - Multi-window validation report with breach timeline200 - Platform-specific alerting rules (Prometheus/CloudWatch/Datadog)201 - Error budget status with burn rate metrics202 - Dashboard configuration (Grafana/CloudWatch JSON)203 - Compliance audit report204205**Sources cited** (accessed 2025-10-26T03:51:54-04:00):206- **Google SRE Workbook - Implementing SLOs**: https://sre.google/workbook/implementing-slos/207- **Google SRE Workbook - Alerting on SLOs**: https://sre.google/workbook/alerting-on-slos/208- **Prometheus Alerting Rules**: https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules/209- **Sloth SLO Generator**: https://github.com/slok/sloth210211---212213### Tier 3 (Deep Analysis)214215**Token budget**: T3 ≤12k tokens216217**Scope**: Advanced SLO validation with anomaly detection, trend analysis, and automated remediation recommendations.218219**Steps:**2202211. **Historical trend analysis**:222 - Analyze SLO performance over extended period (90d, 180d, 1y)223 - Identify seasonality patterns (weekday/weekend, business hours, holidays)224 - Calculate baseline SLO achievement by time period225 - Detect anomalous degradation periods (statistical outliers)2262272. **SLO sensitivity analysis**:228 - Simulate impact of SLO target adjustments (e.g., 99.9% → 99.95%)229 - Calculate required infrastructure improvements to meet tighter SLOs230 - Estimate cost of achieving higher reliability (additional resources, redundancy)2312323. **Multi-service dependency analysis**:233 - Identify upstream/downstream service dependencies234 - Calculate composite SLO (product of dependent service SLOs)235 - Example: If Service A (99.9%) depends on Service B (99.95%), composite = 99.85%236 - Recommend SLO targets for dependencies to achieve overall target2372384. **Automated remediation recommendations**:239 - Analyze breach root causes from incident reports/logs240 - Generate prioritized backlog of reliability improvements241 - Estimate error budget recovery timeline for each improvement242 - Link to related runbooks/playbooks for common failure modes2432445. **Advanced alerting strategies**:245 - **Adaptive thresholds**: Adjust burn rate thresholds based on time-of-day/day-of-week patterns246 - **Multi-burn-rate windows**: Combine multiple windows (e.g., 1h AND 6h) to reduce false positives247 - **Budget forecasting**: Predict budget exhaustion based on current burn rate trends2482496. **Comprehensive SLO evaluation**:250 - Generate executive summary report with visualizations251 - Provide SLO tuning recommendations (target too strict/loose?)252 - Include cost/benefit analysis of SLO improvements253 - Export results to common formats (PDF, Excel, JSON)254255---256257## Decision Rules258259**SLO compliance determination:**260261- **PASS**: Actual SLO ≥ target for all evaluated time windows262- **FAIL**: Actual SLO < target for any evaluated time window263- **WARNING**: Within 5% of error budget exhaustion (trigger proactive review)264265**Burn rate alert severity mapping:**266267- **Critical (page)**: Fast burn (1h) consuming >2% of 30-day budget268- **Warning (ticket)**: Medium burn (6h) consuming >5% of 30-day budget269- **Info (notification)**: Slow burn (3d) consuming >10% of 30-day budget270271**Dashboard generation strategy:**272273- **Prometheus metrics**: Use Grafana with Sloth-generated dashboards274- **CloudWatch metrics**: Use native CloudWatch dashboards275- **Datadog metrics**: Use Datadog SLO UI with custom widgets276- **Multi-platform**: Generate platform-agnostic JSON schema, manual import required277278**Ambiguity thresholds:**279280- If `slo_definition` lacks `window` → default to 30d (SRE standard)281- If `error_budget_policy` not specified → default to `moderate`282- If metrics have >10% data gaps → issue warning, proceed with available data283- If SLO target >99.99% → issue warning about feasibility284285**Abort/stop conditions:**286287- Metrics query returns zero results (invalid query or no data)288- SLO definition malformed (missing required fields)289- Metrics platform authentication/access fails290- Historical data coverage <50% of validation window291292---293294## Output Contract295296**Required fields:**297298```json299{300 "validation_report": {301 "slo_name": "string",302 "target": "number (e.g., 99.9)",303 "windows": [304 {305 "period": "string (7d, 28d, 90d)",306 "actual_slo": "number (achieved %)",307 "compliance": "PASS | FAIL | WARNING",308 "error_budget_total": "number (minutes)",309 "error_budget_consumed": "number (minutes)",310 "error_budget_remaining": "number (minutes)",311 "breach_count": "number",312 "breach_timeline": [313 {314 "start": "ISO8601 timestamp",315 "end": "ISO8601 timestamp",316 "duration_minutes": "number",317 "severity": "critical | warning"318 }319 ]320 }321 ],322 "overall_compliance": "PASS | FAIL"323 },324 "alerting_rules": {325 "platform": "string (prometheus | cloudwatch | datadog)",326 "format": "yaml | json",327 "rules": "string (platform-specific alert definitions)"328 },329 "error_budget_status": {330 "current_burn_rate_1h": "number (multiplier, e.g., 14.4x)",331 "current_burn_rate_6h": "number",332 "current_burn_rate_3d": "number",333 "time_to_exhaustion": "string (e.g., '2 hours' | '15 days' | 'N/A')",334 "budget_policy_triggered": "boolean",335 "recommended_action": "freeze_deploys | monitor_closely | continue_normal_operations"336 },337 "dashboard_config": {338 "platform": "string (grafana | cloudwatch | datadog)",339 "format": "json | yaml",340 "config": "object (platform-specific dashboard definition)"341 }342}343```344345**Optional fields:**346347- `trend_analysis`: Historical SLO performance trends (T3 only)348- `remediation_recommendations`: Prioritized reliability improvements (T3 only)349- `compliance_audit`: Detailed audit report with breach analysis350351**Validation:**352353- All time windows must have `compliance` status354- Burn rate calculations must use correct multipliers for target SLO355- Dashboard config must be valid JSON/YAML for target platform356- Alert rules must be syntactically correct for metrics platform357358---359360## Examples361362**Input:**363364```json365{366 "slo_definition": {367 "name": "API Availability",368 "target": 99.9,369 "window": "30d",370 "sli_query": "sum(rate(http_requests_total{status!~\"5..\"}[5m])) / sum(rate(http_requests_total[5m]))"371 },372 "metrics_source": "prometheus",373 "time_window": "28d",374 "error_budget_policy": "moderate"375}376```377378**Output (abbreviated):**379380```json381{382 "validation_report": {383 "slo_name": "API Availability",384 "target": 99.9,385 "windows": [{386 "period": "28d",387 "actual_slo": 99.87,388 "compliance": "FAIL",389 "error_budget_consumed": 52.4,390 "error_budget_remaining": -12.2,391 "breach_count": 3392 }],393 "overall_compliance": "FAIL"394 },395 "error_budget_status": {396 "current_burn_rate_1h": 2.1,397 "time_to_exhaustion": "N/A (budget exhausted)"398 }399}400```401402---403404## Quality Gates405406**Token budgets:**407408- **T1**: ≤2k tokens for basic SLO validation with simple alerting409- **T2**: ≤6k tokens for multi-window validation with burn rate alerts and dashboards410- **T3**: ≤12k tokens for trend analysis, remediation recommendations, and advanced reporting411412**Safety requirements:**413414- Validate metrics queries are read-only (no writes to metrics platform)415- Warn if SLO breach detected but no historical incidents recorded416- Ensure alert rules don't create excessive notification volume (>10 alerts/day = review needed)417418**Auditability:**419420- All validation results include query timestamps and data sources421- Breach timeline provides exact start/end times for compliance review422- Alert rules are version-controlled and reproducible423424**Determinism:**425426- Same SLO definition + metrics data produces identical validation report427- Burn rate calculations use standard formulas from Google SRE literature428- Error budget math is transparent and auditable429430---431432## Resources433434**Primary sources:**435436- Google SRE Workbook - Implementing SLOs: https://sre.google/workbook/implementing-slos/437- Google SRE Workbook - Alerting on SLOs: https://sre.google/workbook/alerting-on-slos/438- Prometheus Alerting Rules: https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules/439- Datadog SLO Monitoring: https://docs.datadoghq.com/monitors/service_level_objectives/440441**Reference implementations:**442443- Sloth (SLO generator): https://github.com/slok/sloth444- OpenSLO Specification: https://github.com/OpenSLO/OpenSLO445- Pyrra (SLO framework): https://github.com/pyrra-dev/pyrra446447**Additional reading:**448449- The Art of SLOs: https://www.alex-hidalgo.com/the-art-of-slos450- SLI/SLO Workshop: https://www.usenix.org/conference/srecon19americas/presentation/fong-jones