VMware Cloud Community
udayshankarm
Contributor
Contributor

How to get the ESXi host status that is managed by vCenter by monitoring vCenter Database

Hi,

My vCenter is managing several ESXi hosts, and if the ESXi is down for what ever the reason like power down or network down etc..

As we see the ESXi host that is down as inaccessible i.e. red cross on ESXi host in vSphere Client. In that situation I want to get the list of ESXi hosts that are down by monitoring vCenter Database.

I take look at the VPX_HOST table but I couldn't found the exact columns which tells me the status of the ESXi host.

Could you please help in finding the particular column or columns and the table in vCenter Database that represent the status or state of the ESXi host?

Thanks & Regards,

Uday.

Reply
0 Kudos
5 Replies
GFK
Enthusiast
Enthusiast

Have you looked at the PowerCLI command Get-VMHost? here you can get the state of the hosts you want to retrieve. The valid values  are Connected, Disconnected, NotResponding, and Maintenance.

Gert Kjerslev | If you find this or any other answer useful please consider awarding points by marking the answer correct or helpful
Reply
0 Kudos
udayshankarm
Contributor
Contributor

I can't execute the power CLI commands from my external application but I have an access to vCenter Database.in the form of data source.

I want to get the status from the vCenter Database.

Regards,

Uday.

Reply
0 Kudos
GFK
Enthusiast
Enthusiast

Okay, the Power_State column of the vpxv_Hosts table have the power state of the host. Possible values are off and on. I thing this is what you are looking for..?

Gert Kjerslev | If you find this or any other answer useful please consider awarding points by marking the answer correct or helpful
GFK
Enthusiast
Enthusiast

BTW: You con see all the database views for vCenter here: http://www.vmware.com/resources/techresources/10210

Gert Kjerslev | If you find this or any other answer useful please consider awarding points by marking the answer correct or helpful
Reply
0 Kudos
udayshankarm
Contributor
Contributor

Will the power_state and Mmode (maintenance mode) columns in the vpxv_hosts table cover all the possible host failures?

Reply
0 Kudos