robusta-dev / krr

Prometheus-based Kubernetes Resource Recommendations
MIT License
3.05k stars 160 forks source link

Prometheus metrics period #339

Open Najafov007 opened 1 month ago

Najafov007 commented 1 month ago

Hi again! Wanted to ask a ques, as I've understood robusta krr shows only the last 14days of a pod resource requests and limits and gives a suggestion. Is there any way to change that number to let's say fewer days? Or it's as it is - 14 days? Thank you!)

aantn commented 1 month ago

Hi, try using --history-duration. You can see all available cli options by running krr simple --help

On Mon, Sep 23, 2024 at 8:04 AM Najafov007 @.***> wrote:

Hi again! Wanted to ask a ques, as I've understood robusta krr shows only the last 14days of a pod resource requests and limits and gives a suggestion. Is there any way to change that number to let's say fewer days? Or it's as it is - 14 days? Thank you!)

— Reply to this email directly, view it on GitHub https://github.com/robusta-dev/krr/issues/339, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADYUB4U4QQOUV6ZD5FI3WDZX6OPJAVCNFSM6AAAAABOVIRWQ2VHI2DSMVQWIX3LMV43ASLTON2WKOZSGU2DCNJYGI2TQMY . You are receiving this because you are subscribed to this thread.Message ID: @.***>

Najafov007 commented 1 month ago

Hi, try using --history-duration. You can see all available cli options by running krr simple --help On Mon, Sep 23, 2024 at 8:04 AM Najafov007 @.> wrote: Hi again! Wanted to ask a ques, as I've understood robusta krr shows only the last 14days of a pod resource requests and limits and gives a suggestion. Is there any way to change that number to let's say fewer days? Or it's as it is - 14 days? Thank you!) — Reply to this email directly, view it on GitHub <#339>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADYUB4U4QQOUV6ZD5FI3WDZX6OPJAVCNFSM6AAAAABOVIRWQ2VHI2DSMVQWIX3LMV43ASLTON2WKOZSGU2DCNJYGI2TQMY . You are receiving this because you are subscribed to this thread.Message ID: @.>

Hello again! Thank you for your response, wanted to ask one more thing. Got it about history-duration, we need 7 days. Problem now is time of scratching the metrics... For example we give 7 days, is it scraping the data from prometehus for last ENTIRE 7 days? What I exactly mean, lets say our pods are actively working in between 8AM - 6PM, time before or after that interval pods are cooled down. We dont want robusta krr to take into consideration. We need it to watch only those hours and then give us a suggestion. You know why, it will be wrong from math side if we are considering not only actively working hours, and passive time. Thank you so much!!

aantn commented 1 month ago

If the pods aren't running at all, there is no data and it wont be taken into account. If the pods are running but have low cpu/memory usage, that will be taken into account. You can tweak the P95 etc thresholds (see krr simple --help for options) to adjust for this.

On Wed, Oct 2, 2024 at 3:48 PM Najafov007 @.***> wrote:

Hi, try using --history-duration. You can see all available cli options by running krr simple --help … <#m-3088870937315420851> On Mon, Sep 23, 2024 at 8:04 AM Najafov007 @.> wrote: Hi again! Wanted to ask a ques, as I've understood robusta krr shows only the last 14days of a pod resource requests and limits and gives a suggestion. Is there any way to change that number to let's say fewer days? Or it's as it is - 14 days? Thank you!) — Reply to this email directly, view it on GitHub <#339 https://github.com/robusta-dev/krr/issues/339>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADYUB4U4QQOUV6ZD5FI3WDZX6OPJAVCNFSM6AAAAABOVIRWQ2VHI2DSMVQWIX3LMV43ASLTON2WKOZSGU2DCNJYGI2TQMY https://github.com/notifications/unsubscribe-auth/AADYUB4U4QQOUV6ZD5FI3WDZX6OPJAVCNFSM6AAAAABOVIRWQ2VHI2DSMVQWIX3LMV43ASLTON2WKOZSGU2DCNJYGI2TQMY . You are receiving this because you are subscribed to this thread.Message ID: @.>

Hello again! Thank you for your response, wanted to ask one more thing. Got it about history-duration, we need 7 days. Problem now is time of scratching the metrics... For example we give 7 days, is it scraping the data from prometehus for last ENTIRE 7 days? What I exactly mean, lets say our pods are actively working in between 8AM - 6PM, time before or after that interval pods are cooled down. We dont want robusta krr to take into consideration. We need it to watch only those hours and then give us a suggestion. You know why, it will be wrong from math side if we are considering not only actively working hours, and passive time. Thank you so much!!

— Reply to this email directly, view it on GitHub https://github.com/robusta-dev/krr/issues/339#issuecomment-2388563024, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADYUB2QQ2K2YLJFGIEH63DZZPTQTAVCNFSM6AAAAABOVIRWQ2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOBYGU3DGMBSGQ . You are receiving this because you commented.Message ID: @.***>