geschnei
Contributor
Contributor

Getting standby status of ESXi host via REST API

We have enabled vSphere DPM and now I'm trying to get the Standby status of the ESXi hosts for our Zabbix monitoring.

Via the REST API I can get the connection_state and power_state via /api/vcenter/host

But when I query a host that is in Standby and therefor offline and disconnected I only get this answer:

{
  "error_type": "INTERNAL_SERVER_ERROR",
  "messages": [
    {
      "args": [
        "com.vmware.vcenter.host.summary",
        "connection_state",
        "NOT_RESPONDING",
        "power_state"
      ],
      "default_message": "Structure com.vmware.vcenter.host.summary has a union constraint with tag 'connection_state' of value 'NOT_RESPONDING', for which the field 'power_state' is not allowed to be set.",
      "id": "vapi.data.structure.union.extra"
    }
  ]
}

 Is there a way I can get the Standby state and differentiate against hosts that are actually down because of a problem?

Labels (3)
0 Kudos
0 Replies