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

Create plugin to monitor (vCenter) server time #14

Open atc0005 opened 3 years ago

atc0005 commented 3 years ago

Per the docs, methods.GetCurrentTime(ctx, c) will retrieve the vCenter server time in UTC.

We should be able to gather the current time from a reference NTP server and compare against this value. If the difference is more than X, then one state, if more than Y, then another state.

Not sure if this is capability is present for standalone ESXi hosts or if only through vCenter.

atc0005 commented 3 years ago

https://vdc-download.vmware.com/vmwb-repository/dcr-public/a5f4000f-1ea8-48a9-9221-586adff3c557/7ff50256-2cf2-45ea-aacd-87d231ab1ac7/vim.ServiceInstance.html

See the CurrentTime method.

atc0005 commented 3 years ago

Some examples of querying for specific properties: