How do I change the SQL query to select only certain interfaces?
Depends entirely how you want to filter it.
Below is a simple example:
SELECT I.InterfaceID , N.NodeID , N.Caption AS NodeName , N.DetailsUrl AS NDetailsUrl , N.VendorIcon AS Vendor , I.Caption AS Interface_Caption , I.InterfaceIcon AS Interface_Icon , I.DetailsUrl AS IDetailsUrl , AverageInboundBps95th , AverageOutboundBps95th , AverageTotalBps95thFROM ( SELECT [DateTime] , InterfaceID , AverageInboundBps95th , AverageOutboundBps95th , AverageInboundBps99th , AverageTotalBps95th FROM Orion.NPM.InterfacePercentiles WHERE [DATETIME] BETWEEN AddMonth(- 1, DateTrunc('month', GETUTCDATE())) AND DateTrunc('month', GETUTCDATE()) ) AS IPJOIN Orion.NPM.Interfaces AS [I] ON I.InterfaceID = IP.InterfaceIDJOIN Orion.Nodes AS [N] ON I.NodeID = N.NodeIDWHERE [N].Caption LIKE 'StartsWith%' OR [I].Caption LIKE '%EndsWith'
It just uses standard SQL-style filtering with a WHERE clause.
What query are we talking about? Can you include a screenshot or something to help us understand specifically where you are trying to make this change?
Sorry....It is this query
SELECTI.InterfaceID,N.NodeID,N.Caption AS NodeName,N.DetailsUrl AS NDetailsUrl,N.VendorIcon AS Vendor,I.Caption AS Interface_Caption,I.InterfaceIcon AS Interface_Icon,I.DetailsUrl AS IDetailsUrl,AverageInboundBps95th,AverageOutboundBps95th,AverageTotalBps95thFROM(SELECT[DateTime],InterfaceID,AverageInboundBps95th,AverageOutboundBps95th,AverageInboundBps99th,AverageTotalBps95thFROM Orion.NPM.InterfacePercentilesWHERE [DATETIME] BETWEEN AddMonth(-1,DateTrunc('month', GETUTCDATE())) AND DateTrunc('month', GETUTCDATE())) AS IPJOIN Orion.NPM.Interfaces I ON I.InterfaceID = IP.InterfaceIDJOIN Orion.Nodes N ON I.NodeID = N.NodeID