Choosing SLIs
Cheat sheet · https://pcornel.dk/topic.php?topic=6225
Answer
Choosing SLIs: pick measurements that reflect user experience — availability (good/valid requests), latency (requests below a threshold), freshness, correctness — measured as close to the user as possible.
Remember
Express SLIs as good events / valid events. Exclude invalid requests (e.g. 4xx caused by clients) deliberately. Fewer SLIs are better.
First checks
sum(rate(http_requests_total{code!~"5.."}[5m])) / sum(rate(http_requests_total[5m]))— first check for this topiccurl -s localhost:9090/-/ready— Prometheus readycurl -s 'localhost:9090/api/v1/query?query=up'— scrape targets up/downpromtool check config prometheus.yml— config valid
Verify in this order
user journey → good/valid events → SLI
Where it usually breaks
Measuring only server-side misses load balancer or network failures.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=6225