Hello,
I've done some searching, but haven't found anything definitive. What I'd like to do is create a query against Prometheus that will extract two metrics as sum's, and then perform some arithmetic on them. The use-case here is to compare two histogram metrics of status code returns.
The metric is: http_status_codes. Here's some pseudo code of what I'd like to do.
sum( sum(irate(http_status_codes{host=~".*mysite.*",code="429"}[1m])) / sum(irate(http_status_codes{host=~".*mysite.*",code="200"}[1m])) )
I want to calculate a ratio of the number of 429's to 200's.
Is this possible with a prometheus query?
-Dave