Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gcp job retriever #1788

Closed
afumagalli98 opened this issue May 13, 2024 · 0 comments · Fixed by #1807
Closed

gcp job retriever #1788

afumagalli98 opened this issue May 13, 2024 · 0 comments · Fixed by #1807
Assignees
Labels
enhancement New feature or request

Comments

@afumagalli98
Copy link
Member

afumagalli98 commented May 13, 2024

Create a scheduled job to retrieve instances data and add recommendations.

  • retrieve all projects from GCP (query-1)

  • for each project retrieve all instances (query-2)

  • for each instance retrieve the average CPU utilization per day between the current date (*) and 90 days ago (query-3)

  • for each instance retrieve max CPU utilization per minute between the current date (*) and 7 days ago (query-4)

  • for each instance retrieve max memory utilization per minute between the current date (*) and 7 days ago (query-5)

  • for each instance retrieve all disk (query-6)

  • for each disk retrieve the max throughput write per day between the current date (*) and 5 days ago (query-7)

  • for each disk retrieve the max throughput read per day between the current date (*) and 5 days ago (query-8)

  • for each disk retrieve the max iops write per day between the current date (*) and 5 days ago (query-9)

  • for each disk retrieve the max iops read per day between the current date (*) and 5 days ago (query-10)

*always starting from midnight

recommendation must be created if these conditions are satisfied:

  • query-3 doesn't return a value > 0.5 at least for 3 times (configurable)
  • query-4 doesn't return a value > 0.5 at least for 180 times
  • query-5 doesn't return a value > 0.9 at least for 1 time
  • query-7-8-9-10 return a value < the half of the disk limit**

**disk limit

the limits must be calculated based on this doc.
if the of the disk and vm is greater than the reference use the reference value as the disk limit

image

image

@afumagalli98 afumagalli98 self-assigned this May 14, 2024
@afumagalli98 afumagalli98 added the enhancement New feature or request label May 14, 2024
@afumagalli98 afumagalli98 added the investigate Require designing/thinking/investigating label May 21, 2024
@afumagalli98 afumagalli98 removed the investigate Require designing/thinking/investigating label May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant