30-day availability and remaining SLO error budget
Availability measured on non-5xx responses, then positioned against a 99.9% SLO — the remaining budget as a percentage drives deployment freezes.
Prerequisites
Elasticsearch 8.12+, Kibana
SQL
FROM "logs-lb-*"
| WHERE @timestamp >= NOW() - 30 days
| EVAL ok = CASE(http.response.status_code < 500, 1, 0)
| STATS
total = COUNT(*),
reussites = SUM(ok)
BY service.name
| EVAL disponibilite_pct = ROUND(100.0 * reussites / total, 3)
| EVAL budget_restant_pct = ROUND(
(disponibilite_pct - 99.9) / (100.0 - 99.9) * 100, 1)
| SORT budget_restant_pct ASC
| LIMIT 25Result
service.name | total | reussites | disponibilite_pct | budget_restant_pct -------------+----------+-----------+-------------------+------------------- checkout-api | 52110483 | 52041208 | 99.867 | -33.0 billing-api | 18432011 | 18415822 | 99.912 | 12.0 search-api | 48211002 | 48180432 | 99.937 | 37.0 auth-svc | 29402113 | 29393412 | 99.970 | 70.0
SLOSREDisponibilitéError budget