NodeID displays null values in SWQL

Hi,

I am trying to join Orion.nodes table with Cloud.Azure.Instances on NodeID. However, in few of my nodes, the NodeID is showing Null which leads to incorrect output. Here's my below query:

SELECT 
n.CloudInstance.DisplayName AS Nodename
,n.IPAddress
,n.CPULoad
,n.PercentMemoryUsed
,n.StatusDescription
,n.DetailsUrl
,n.CloudInstance.Region AS CloudInstance_Region
,n.CloudInstance.SubnetId AS CloudInstance_SubnetId
,n.StatusIcon
,n.Status
,n.StatusLED
,AI.Resourcegroup as ResourceGroup
,n.CloudInstance.Type
,n.CPUCount
,round((TotalMemory/1024/1024/1024),1) as [RAM] 

FROM Orion.Nodes n 
Join Orion.Cloud.Azure.Instances AI 

If I put a where condition of n.IPAddress like 10.100.% the output gives me as total of 50 nodes.

But if I execute the query from table Orion.Nodes where IPAddress like 10.100.%, total nodes are 70. The reason behind this difference indicates that those 20 nodes have NULL values in NodeID column under Cloud.Azure.Instances table.

Can anyone please help me with getting the correct output?

Thanks in advance.

Parents
  • Hi,

    Not having an Azure instance, verify that Azure table does have a NodeID column that you can link to.
    For example, if the Azure table has a NodeID field, adjust your join as follows:

    Join Orion.Cloud.Azure.Instances AI on n.NodeID=AI.NodeID

Reply
  • Hi,

    Not having an Azure instance, verify that Azure table does have a NodeID column that you can link to.
    For example, if the Azure table has a NodeID field, adjust your join as follows:

    Join Orion.Cloud.Azure.Instances AI on n.NodeID=AI.NodeID

Children
No Data