EOC Sites Query

Hi All,

I'm trying to build queries for things like the modern dashboards for my EOC instance and while I can get Nodes/Interfaces data etc in I am unable to figure out a way to get a column to show up for what Orion Site the device sits in. Was hoping someone had already solved this problem or can give guidance. For Example the query below brings in all my nodes for all 4 of my environments, just can't figure out how to join it to get the Sites.

Select N.Caption as [Node Name], N.MachineType as [Machine Type], N.IP_Address as [IP Address], N.Vendor as Vendor, N.VendorIcon as [Vendor Icon], N.Status, N.DetailsURL as [Details URL]
From Orion.Nodes N
WHERE N.Category=1

Parents
  • So I figured it out. Its adding x.InstanceSiteID, so in this case it would be n.instancesiteID. Then do a join like below and it'll pull it in where you can add it as a column.

    Select N.Caption as [Node Name], N.MachineType as [Machine Type], N.IP_Address as [IP Address], N.Vendor as Vendor, N.VendorIcon as [Vendor Icon], N.Status, N.DetailsURL as [Details URL], n.instancesiteID as [Site]
    From Orion.Nodes N
    JOIN Orion.EOC.Sites S ON N.InstanceSiteId = S.SiteID
    WHERE N.Category=1
Reply
  • So I figured it out. Its adding x.InstanceSiteID, so in this case it would be n.instancesiteID. Then do a join like below and it'll pull it in where you can add it as a column.

    Select N.Caption as [Node Name], N.MachineType as [Machine Type], N.IP_Address as [IP Address], N.Vendor as Vendor, N.VendorIcon as [Vendor Icon], N.Status, N.DetailsURL as [Details URL], n.instancesiteID as [Site]
    From Orion.Nodes N
    JOIN Orion.EOC.Sites S ON N.InstanceSiteId = S.SiteID
    WHERE N.Category=1
Children