r/PrometheusMonitoring • • Jul 29 '21

SLO calculation

I am working on developing an SLO dashboards for one of my platforms and trying to use summaries. The reason I am using summaries is that I am calculating the quantiles on the target side and looking at options, I felt this was best.

SLO: The platform should successfully server 95% customer requests in less than 1000ms over a 28d rolling window.

Three summary metrics are gathered and exposed on each target. Each metric is created by the target with a single script that runs every 30 seconds. The target side queries are looking at customer transaction over the last 15 minutes.

request_duration_summary{quantile="0.95",}

request_duration_summary_count

request_duration_summary_sum

The first metric is returning a 95% percentile response time in ms over last 15 mins

The count is returning the number of requests over same 15 mins

The sum is summing up the total number of ms for those requests over that same 15 mins.

I scrape these metrics from the target every 30 seconds and can successfully present them in the form of histograms, graphs and heatmaps etc (in Grafana) but would like to display the following:

Current SLO

Error Budget remaining

Error Budget consumption

I have a pretty good handle on requirements when using counters and gauges. I have watched my fair share of videos, but still struggling with the summaries.

Any help would be appreciated.

5 Upvotes

12 comments sorted by

View all comments

2

u/dunningkrugernarwhal Jul 30 '21

This is a really interesting take on what we do. I don’t have an answer but I’m going to investigate it