Hi Guys,
I was working on a swql query to get the list of all vms from vmware / hyperv or nutanix. This query has helped me to identify which servers are Managed servers and which are not. Thats not it, I have also added custom properties too for more granular analysis. Here's the query for your reference.
SELECT n.Name as [VM]
,n.IPAddress
,n.PowerState
,Round(n.MemUsage, 0) AS [Memory]
,ROUND(n.CpuLoad, 0) as [CPULoad]
,n.BootTime
,n.ProcessorCount
,n.DetailsUrl
,n.Status
,h.HostName
,h.DetailsUrl as [HostURL]
,d.Name as [Datacenter]
,d.DetailsUrl as [DatacenterURL]
,c.Name as [Cluster]
,v.DisplayName AS [Vcenter]
,c.DetailsUrl as [ClusterURL]
,Case
When n.NodeID IS NULL Then 'No'
When n.NodeID IS Not Null Then 'Yes'
End as [Managed Node]
,P.Name
--,NC.Application -- (Replace it with your custom property from Orion.NodesCustomProperties table)
--,NC.City -- (Replace it with your custom property from Orion.NodesCustomProperties table)
,n.GuestName
FROM Orion.VIM.VirtualMachines n
Join Orion.VIM.Hosts h on n.HostID = h.HostID
Left Outer Join Orion.VIM.Clusters c on c.ClusterID = h.ClusterID
Left Outer Join Orion.VIM.DataCenters d on d.DataCenterID = h.DataCenterID
Left Outer Join Orion.Vim.Platform P on P.PlatformID = n.PlatformID
Left Outer Join Orion.VIM.VCenters v on v.VCenterID = d.VCenterID
Left Outer Join Orion.Nodes NN ON n.NodeID = NN.NodeID
Left Outer Join Orion.NodesCustomProperties NC ON NC.NodeID = n.NodeID
I am trying to add this to the content exchange in Custom query section but for some reason it is not allowing me to do because of in correct file type. It only allows file type as swql and not text. Any idea how can I share it on content exchange please?