Consider a counter my_counter with a label success. I created a success rate metric with this query: rate(my_counter[10m]{success="true"})/rate(my_counter[10m]).
Now I want to know how much time the rate was below a certain threshold. I have a Grafana dashboard with Prometheus as its data source. With Grafana I can easily pick a time range, but I still need a way to sum the time where my condition applies.
Any ideas?