slo-tracker/README.md

28 lines
757 B
Markdown

# slo-tracker
Minimal CLI for tracking SLO burn rates from Prometheus.
Outputs a quick summary to stdout — useful for morning standups and incident reviews.
Built for my own use. Tested on the Nexus prod setup.
## Usage
python slo_tracker.py --config slos.yml --window 7d
## Config format
slos:
- name: "API availability"
query: 'sum(rate(http_requests_total{code!~"5.."}[5m])) / sum(rate(http_requests_total[5m]))'
target: 0.999
window: 30d
## Requirements
pip install prometheus-api-client pyyaml rich
## Burn rate
The `burn_rate()` helper calculates how quickly you're spending your error budget
relative to a 30-day window. A burn rate > 1 means you'll exhaust the budget before the window closes.