atc0005 / check-vmware

Go-based tooling to monitor VMware environments; NOT affiliated with or endorsed by VMware, Inc.
MIT License
17 stars 3 forks source link

Update `check_vmware_hs2ds2vms` plugin to support excluding `VMware Mobility Platform` host & associated datastore #1270

Open atc0005 opened 1 month ago

atc0005 commented 1 month ago

Overview

Whenever our VMware admins perform work to update the associated VMware Hybrid Cloud Extensions (HCX) resources service checks using the check_vmware_hs2ds2vms plugin are triggered.

This is because the service account we're using to run the plugin sees the associated datastore (ma-ds-* where * is a 36 character alphanumeric string with dashes) for the mobility agents (shown as VMware Mobility Platform model hosts) and object to the lack of a Location attribute.

I don't know if they're able to assign a Location attribute, but the workaround thus far has been for our VMware admins to remove access to the mobility agent host entries and the associated datastore.

Ideally (from the perspective of this plugin), we could provide a flag to ignore specific model hosts (or find a better attribute to key off of) along with datastores which consider the host its parent. Then whenever VMware Hybrid Cloud Extensions (HCX) resources are updated in the future those host/datastore objects will be ignored and the service check(s) will continue to function as before, evaluating based solely on Location attribute values.

References

atc0005 commented 1 month ago

Snippet of what the vSphere web UI shows for the mobility agent host entry:

image

atc0005 commented 1 month ago

Looking at the Managed Object Browser UI:

Properties:

Any of those values may be enough to use for exclusion purposes.