I'm trying to create an SLO dashboard using Prometheus and Grafana. One of 
the charts that I want to add is an *Error Budget Burndown* in the last X 
days (starts with 100% and then burns down), something similar to: 

[image: slo-reset-button.png]
I can do it using a custom script and two different Prometheus queries.

 - Fetch total no. of requests in last X days (TOTAL) [Query 1]
 - Allowed bad requests = TOTAL * (1-SLO)/100
 - Fetch no. of bad requests in each window (say 1 hr) in last X days 
[Query 2]
 - Calculate % budget remaining after each window and plot it

Is there a way to do it using a single Prometheus query and then plot it in 
Grafana?

Thanks










-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prometheus-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/9cdf1e8d-a793-4b9b-8eed-fdbacd8f45ddn%40googlegroups.com.

Reply via email to