-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add support for excluding/ignoring VMs by Folder
Managed Object ID (MOID)
#809
Comments
Folder
Managed Object ID (MOID)
After giving this some thought, it's probably not a good idea to try to match on a Folder name. Instead, we should filter by a |
Worth noting (from https://vdc-repo.vmware.com/vmwb-repository/dcr-public/97e6db01-d441-472e-ad53-b48c2bb0e1e4/45347fb1-052d-44b7-b3e9-cbefc34488e3/SDK/vsphere-ws/docs/ReferenceGuide/vim.Folder.html):
|
The initial implementation of this feature is complete and applicable plugins have been updated to use the new support:
Will test for a bit to make sure nothing obvious is busted before cleaning up/merging to |
Update these plugins (and supporting code): - check_vmware_disk_consolidation - check_vmware_hs2ds2vms - check_vmware_power_uptime - check_vmware_question - check_vmware_rps_memory - check_vmware_snapshots_age - check_vmware_snapshots_count - check_vmware_snapshots_size - check_vmware_tools - check_vmware_vcpus - check_vmware_vhw - check_vmware_vm_backup_via_ca - check_vmware_vm_list with these changes: - provide new flags to explicitly include/exclude virtual machines by given folder Managed Object IDs (MOIDs) - NOTE: these flags are *not* provided for the `check_vmware_rps_memory` plugin, but the metrics related to folders are listed due to the use of shared metrics logic - refactoring - rework virtual machine filtering logic to more easily support existing filtering support alongside adding further options - use common report "trailer" to provide consistent values/formatting for plugins providing support for filtering and reporting metrics for virtual machines - use VMsFilterOptions and VMsFilterResults types to simplify argument handling and provide consistent - split datastore performance configuration handling into separate file - documentation updates - provided detailed explanation of provided metrics - add coverage for new metrics References: - GH-809 - GH-852
Convert remaining plugin doc metric lists to tables and fill with metric descriptions. This commit also removes a metrics list left behind in one of the plugin docs from previous conversion work. refs GH-809
Update these plugins (and supporting code): - check_vmware_disk_consolidation - check_vmware_hs2ds2vms - check_vmware_power_uptime - check_vmware_question - check_vmware_rps_memory - check_vmware_snapshots_age - check_vmware_snapshots_count - check_vmware_snapshots_size - check_vmware_tools - check_vmware_vcpus - check_vmware_vhw - check_vmware_vm_backup_via_ca - check_vmware_vm_list with these changes: - provide new flags to explicitly include/exclude virtual machines by given folder Managed Object IDs (MOIDs) - NOTE: these flags are *not* provided for the `check_vmware_rps_memory` plugin, but the metrics related to folders are listed due to the use of shared metrics logic - refactoring - rework virtual machine filtering logic to more easily support existing filtering support alongside adding further options - use common report "trailer" to provide consistent values/formatting for plugins providing support for filtering and reporting metrics for virtual machines - use VMsFilterOptions and VMsFilterResults types to simplify argument handling and provide consistent - split datastore performance configuration handling into separate file - documentation updates - provided detailed explanation of provided metrics - add coverage for new metrics References: - GH-809 - GH-852
Overview
Ran into a situation where I needed to filter VMs byFolder
name.Ran into a situation where I needed to filter VMs by a specific
Folder
. While we could attempt to match a name, we could easily run into a situation where the same name is used in multiple places all visible to the same service account. Due to this and because the vSphere Client (web) exposesFolder
Managed Object ID (MOID) values in the URL we can offer support for filtering byFolder
MOID values instead.This could be used in the same way that excluding/including resource pools are currently supported.
TODO
References
Folder
Managed Object TypeThe text was updated successfully, but these errors were encountered: