Thanks for your reply! I tried to use avg_over_time and quantile_over_time, 
these 2 functions will still return a time series data based on the 
cpu_utilization data. So if I apply "< 0.10" on it, it will still return 
the data points which are < 0.1. 
This 2 functions are helpful, but still I didn't get the result I need. For 
example, I apply these 2 functions for the cpu utilization data on 
4/1/2021, I still get a time series for it. How can I determine if the "cpu 
utilization on 4/1/2021 is above or below 20%"? 

On Saturday, April 3, 2021 at 1:00:51 AM UTC-7 [email protected] wrote:

> You want to use one of the "over time" functions.
>
> avg_over_time(cpu_utilization[1d]) < 0.10
>
> quantile_over_time(0.9 cpu_utilization[1d]) < 0.10
>
> On Sat, Apr 3, 2021 at 1:34 AM chuanjia xing <[email protected]> wrote:
>
>> Hi there,
>>      I think my question is pretty common but looks like I can't find the 
>> answer to it. 
>>      The problem I am trying to solve is: Let's say I have 100 metrics 
>> data for cpuutilization for my instance. Each one is a time series for 1 
>> day with granularity of 1 min. So each one has 1,440 data point. 
>>        Now I want to select the instances which has an "average cpu 
>> utilization" <= 10% for one day. How should I do this, basically how should 
>> I calculate the "average cpu utilization" for one time series? 
>>         One way I am thinking to do is, for each time series, I find the 
>> p90 data point and check if it is <= 10%. If it is, then I'll say that this 
>> instance data is with "average cpu utilization" <= 10% and select it. But 
>> looks like there's no function in Prometheus for me to find the p90 for a 
>> time series, or I just didn't find the right function for it.
>>          So, is above the right way to select? If yes, how can I find the 
>> p90 for a time series? If not, then how should I solve this problem?
>>
>> Thanks,
>>
>> -- 
>> 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/89dfc6ac-2c05-4fab-8c04-eb68e32af214n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/prometheus-users/89dfc6ac-2c05-4fab-8c04-eb68e32af214n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
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/9a1f8455-362f-4b27-8ca6-913636d52f59n%40googlegroups.com.

Reply via email to