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/CABbyFmrBsw7qtZcChURGh1ouQyE_STqp%3DeHdH-G4bXEcrAm9JQ%40mail.gmail.com.

