SLOs and burn-rate alerts on vLLM-style metrics with Prometheus and Grafana in Docker
CPU · your Maccli150 minrequiredGoal · A docker compose stack with three stub replicas exporting vLLM metric names, Prometheus recording and burn-rate alerting rules for a TTFT SLO and an availability SLO, and a Grafana dashboard showing budget remaining.
- 1Extend stub_server.py from the resilience topic so its /metrics exposes vllm:time_to_first_token_seconds (histogram), vllm:time_per_output_token_seconds, vllm:num_requests_waiting, vllm:num_requests_running and a request counter with a status label; add an environment variable that injects a configurable error rate and TTFT inflation.
- 2Write docker-compose.yml running three replicas, Prometheus scraping them every 5 s, Alertmanager and Grafana.
- 3Define two SLOs in a README: 99 percent of requests have TTFT under 500 ms over 30 days, and 99.9 percent of requests succeed over 30 days; compute each error budget in minutes.
- 4Write recording rules for the good-event ratio of each SLI and alerting rules with two burn-rate pairs (14.4x over 1 h and 6x over 6 h) following the SRE workbook.
- 5Build a Grafana dashboard with TTFT p99 per replica, error ratio, burn rate and remaining budget panels.
- 6Drive load with a small client; inject a 10 percent error rate on one replica and confirm the fast-burn alert fires; remove it and confirm the alert resolves.
- 7Inject TTFT inflation of 400 ms on all replicas and confirm the latency burn alert fires while a 100 ms inflation does not.
- Deliverable
- The compose stack, rule files, dashboard JSON and screenshots of the alert firing and resolving.
- Check
- Error budget for the 99.9 percent SLO is computed as 43.2 minutes per 30 days; the fast-burn alert fires within 5 minutes of injecting the 10 percent error rate and resolves after removal; the 100 ms inflation produces no alert.