VMWare ESXi vSphere component via pyvmomi

I would love to be able to monitor my ESXi server in HA.
Home assistant runs on my ESXi server along with a whole bunch of other stuff and it would be great to get insight on how the hypervisor is running - e.g. overall and per-VM cpu/memory etc.

vSphere has a python API:

Its been a while since I posted this, and I wondered if anyone has any other solution to monitor vmware ESXi hypervisor?

Behave you looked at SNMP. It’s built into esxi and there is an existing HA component.

Thanks for the pointer. I’ll take a look at SNMP.

Voting +. ESXi doesnt disclose much (important) information through SNMP.
List of processes running on the host? Sure. But important info like temperature, fan speed, memory usage or cpu utilization of each VM? Nah.

I just started looking in to this. Using the vmomi api (via pyVmomi) would be the most ideal way to go forward, as it would work both for standalone ESXi hosts as well as vCenter and many ESXi hosts.

ESXi host level stats can be queried using
https://code.vmware.com/apis/358/vsphere#/doc/vim.host.Summary.QuickStats.html

VM level stats can be queried using. Unfortunately, unlike most of the other properties through this VM, the VM quickstats do not support the propertyCollector notifications.
https://code.vmware.com/apis/358/vsphere#/doc/vim.vm.Summary.QuickStats.html

If vm-tools are installed on the guest, then the following GuestInfo can be used to get things like hostname/os/ipaddress/etc.
https://code.vmware.com/apis/358/vsphere#/doc/vim.vm.GuestInfo.html

1 Like

This would be great to have!

Look here

2 Likes