Filter values when using range vectors

46 views
Skip to first unread message

Amir Yeshurun

unread,
Jul 22, 2020, 8:47:31 AM7/22/20
to Prometheus Users

Hello,

I am using the following query in order to get a range vector:

api_timing{api_name="<NAME>"}[1d]

Next, I want to get the average of the range vector. To do that, I am using avg_over_time - BUT, when there is a single NaN value inside the range vector, the operation returns NaN. I tried to run:

avg_over_time(api_timing{api_name="<NAME>"}[1d] >=0)

and got the following error:

Binary expression must contain only scalar and instant vector types

Any suggestions about how to filter NaN values in this case?

Thank you!

Reply all
Reply to author
Forward
0 new messages