Hello,
I am working on some vCD automation and need to create some checks to ensure proper vCD health. Using the vCD PowerCLI, is anyone able to help me find how to get the vCD to vCenter health status...I would also like to get vCD to NSX health, but that is secondary atm.
This is what I require using the API call below
https://vcloud.fqdn.com/api/query?type=virtualCenter&format=references" name="virtualCenter" type="application/vnd.vmware.vcloud.query.references+json
<VirtualCenterRecord clusterHealthStatus="GREEN" clustersCount="2" demandedCpuMhz="115344" demandedMemMb="152521" diskFreeBytes="83990123905024" diskSizeBytes="102382893531136" diskUncommittedBytes="94160256624457" hasProxy="false" isBusy="false" isEnabled="true" isProviderScoped="true" isSupported="true" isTenantScoped="false" listenerState="CONNECTED" name="XXX-vc1" poweredOnVmCount="139" reservedCpuMhz="10990" reservedMemMb="65286" status="READY" totalCpuMhz="233896" totalMemMb="2734223" totalVmCount="218" url="https://XXX-vc1.fqdn.local:0/sdk" userName="administrator@vsphere.local" uuid="AF92BDA6-9C0A-492C-8257-xxxxxxxx" vcVersion="7.0.2" vsmIP="https://10.x.x.x:443" vsmVersion="6.4.13" href="https://vcloud.fqdn.com/api/admin/extension/vimServer/d8e4bae2-2a52-4cee-bea7-xxxxxxx"/>
Thank you
Hi.
You can use Search-Cloud -QueryType VirtualCenter
$vcs = Search-Cloud -QueryType VirtualCenter
$vcs.name
$vcs.Url
$vcs.Status
$vcs.ListenerState
$vcs.IsEnabled
Hi.
You can use Search-Cloud -QueryType VirtualCenter
$vcs = Search-Cloud -QueryType VirtualCenter
$vcs.name
$vcs.Url
$vcs.Status
$vcs.ListenerState
$vcs.IsEnabled
Thank you, that gave me what I needed @Macleud
Any idea how to get NSX-v and NSX-T info?
Not sure if this is suitable for monitoring.
That's all you can get through the PowerCli.
But even in the API you can’t see more.
# Nsx-V Manager
$vcs = Search-Cloud -QueryType VirtualCenter
$VcView =$vcs | Get-Ciview
$Vsm = $VcView.Link | where {$_.type -eq "application/vnd.vmware.admin.vshieldmanager+xml"}
$Vsm | ForEach-Object {Get-Ciview -id "$($_.Href)"}
# Nsx-T Manager
$Vcloud = $DefaultCIServers | Get-Ciview
$Vcloud.GetExtension().GetNsxtManagers().NsxTManager