i have 3 metrics 
metrics_1 , metrics_2 , metrics_3  all are of type histogram i want to 
write a query that gives the sum of all these metrics filtered by some 
label label_1
i have written this expression 
*(sum by (label_1)(metrics_1{label_1=~".+"} or vector(0)))+(sum by 
(label_1)(metrics_2{label_1=~".+"} or vector(0))) + (sum by 
(label_1)(metrics_3{label_1=~".+"} or vector(0)))*
the issue i am facing is suppose metrics_1 is null and other have some 
valid data  then the whole expression is giving output as zero , what i am 
expecting is it should add the other 2 metrics and take metrics_1  as 0 and 
give the overall sum.
eg : 
metrics_1 = null
metrics_2 = 10
metrics_3 = 14
result = 24 (expected) but actual == 0 
i read some blog that suggested to use coalesce ,fillna but both of these 
function is supported in my case
any help how can i deal with this ??
or is there any other way i can achieve my goal?

-- 
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/ad834479-0850-482c-bd1e-26d3980b3e63n%40googlegroups.com.

Reply via email to