Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upSupport calculating max rate over time #2129
Comments
This comment has been minimized.
This comment has been minimized.
|
You need to create a recording rule for the rate, and then use max_over_time on that. |
brian-brazil
added
the
kind/question
label
Oct 27, 2016
brian-brazil
closed this
Oct 30, 2016
This comment has been minimized.
This comment has been minimized.
|
@brian-brazil I am probably doing it wrong, but it doesn't make any difference. Without any rulesQuery:
Gives:
With ruleUsed rule:
Query with that rule:
Gives:
Even if it should only work with the rule, I think it's worth mentioning that in docs with explanation. It doesn't seem obvious, at least for me. |
This comment has been minimized.
This comment has been minimized.
|
Does the following work? On Sun, 30 Oct 2016, 19:02 Ivan Babrou, notifications@github.com wrote:
|
This comment has been minimized.
This comment has been minimized.
|
@mattbostock that did the trick. |
This comment has been minimized.
This comment has been minimized.
donghwicha
commented
Mar 3, 2018
•
|
Is this still valid? I tried but it fails to gather values max_over_time(cadvisor:cpu_user:rate{my_cont_id=~"/foo/.+"}) |
This comment has been minimized.
This comment has been minimized.
lock
bot
commented
Mar 22, 2019
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
bobrik commentedOct 27, 2016
What did you do?
I have a metric that is a counter (cpu time). I want to calculate max 5m rate over the last 1d to get the estimate max sustained cpu usage for my thing for capacity planning reasons. Turns out, I can't construct such expression. I can only construct "5m rate over the last 1d" part with: