With these two metrics and label combinations you can only calculate ratios 
against the total number of requests. For answering questions like "What is 
the percentage of errors for app `service` against all it's request" you 
will have to improve the instrumentation. A counter for the number of 
requests by `app` would be helpful.

You are dealing with a many-to-many matching which must be explicit. So use 
`group_left` or `group_right`. This should work after adapting the metric 
names:

```
sum(rate(http_request_errors_total[5m]))
/ ignoring (app, pid, status_code) group_left
sum(rate(http_requests_total[5m]))
```
[email protected] schrieb am Mittwoch, 21. Oktober 2020 um 13:21:28 UTC+2:

> Sorry, the labels for the errors metric are [app, pid, status_code] 
> whilst the labels for the total requests metric are [site, method] thanks 
> very much for your help, I'm having a look at label joining now although 
> I'm not sure if it's going to allow me to do what I want to do!
>
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/4758df7c-21bf-43c8-afbe-9d4b7e912329n%40googlegroups.com.

Reply via email to