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

Vsphere audit #5205

Draft
wants to merge 29 commits into
base: main
Choose a base branch
from
Draft

Vsphere audit #5205

wants to merge 29 commits into from

Conversation

acozine
Copy link
Contributor

@acozine acozine commented Jul 26, 2024

Eventually this playbook should pull the parameters we care about from vSphere:

  • how many VMs are running on each host?
  • how much memory is free on each host?
  • how much space is available on the various storage nodes?

Right now the playbook is not pulling the right values. Baby steps.

@acozine
Copy link
Contributor Author

acozine commented Aug 23, 2024

As of 7cb0b71 the playbook succeeds and we get most of the data we want, see this Tower run. Clearly the quickStats.overallMemoryUsage numbers are not the ones we want. Maybe set show_allocated on the VM list, and then total up the allocated memory for all the VMs on each host? Similar to what we're doing now for the number of VMs.

@acozine
Copy link
Contributor Author

acozine commented Sep 3, 2024

From the Ansible community - try converting MB to bytes and then using human_readable like this:
(item | int * 1024 * 1024) | human_readable.

@acozine acozine force-pushed the vsphere_audit branch 3 times, most recently from 5ce5c04 to 3d7f163 Compare September 4, 2024 19:59
@acozine
Copy link
Contributor Author

acozine commented Sep 5, 2024

Okay, a few math struggles later and this works well. There's a rounding-error difference between the memory usage stats in vSphere itself and the ones shown by the playbook, but it is certainly close enough.

Do we want to order the storage info from most-available to least-available? Or is alphabetical by storage node okay?

Also, how do we add a reminder not to use the 15TB storage nodes?

@acozine acozine force-pushed the vsphere_audit branch 2 times, most recently from b995315 to e294b76 Compare September 13, 2024 15:34
@acozine
Copy link
Contributor Author

acozine commented Oct 4, 2024

As of dd4de74 the playbook gets the data we need. Remaining work: present space available only for general purpose storage nodes, not for all storage nodes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant