I think this is very complicated due The first query A returns 10 rows with
label: metric_name A B C ... and the other query B, for example returns the
sum of values of query A without labels so how will these match each other?

El lun, 25 ene 2021 a las 20:23, Stuart Clark (<[email protected]>)
escribió:

> On 25/01/2021 23:08, [email protected] wrote:
>
> Hell Guys
> I have a doubts about using arithmetic operations in Prometheus
> Currently I have a metric *A* that return more than a single row with
> values, so when I try to divide these values of *A* by using the single
> result of another metric *B* I get as result only one row instead of many
> row as the first metric *A*, but when I put the value in hard code, I get
> the result I want it i.e.  many row as the first metric *A*
> *Why is this happening?*
> *Thanks for your help in advance *
>
> With many operations Prometheus will match the metrics using their labels.
> For your example of A & B, take a look at what combinations of labels exist
> - both could be single values or multiple values, both could have identical
> sets of labels or different ones. These will all alter the outcome.
>
> For division by a fixed number there is no problem with label matching, so
> for example A / 5 will return exactly as you'd expect, being each of the
> values of A (which could be multiple combinations of labels) divided by 5.
>

-- 
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/CAKDAv_QJ6iv2egGUgd8gsYyV9YsN4HJEKLm4hBDtiUVo8pywiA%40mail.gmail.com.

Reply via email to