0 Replies Latest reply on Jul 30, 2018 10:57 AM by aeklund

    Creating a tab that finds unused ports

    aeklund

      Hi all, I'm new to solar winds and I'm looking to make a tab on the switch page that displays all the ports on the switch that haven't been used in the past 6 months. There is already a tab that shows the last time each port was used so I was thinking I could just take that and add a WHERE clause that says older than 6 months. This is the code for find the last time used

       

      (SELECT TOP 1 InterfaceTraffic.DateTime AS [ColumnA] FROM Orion.NPM.InterfaceTraffic WHERE Interfaces.InterfaceID = InterfaceTraffic.InterfaceID AND InterfaceTraffic.TotalPackets <> 0 ORDER BY InterfaceTraffic.DateTime desc)  AS [LastSeen]

       

      WHERE Interfaces.NodeID = ${NodeID}

       

      I've tried looking for other people that have done something like this and found this thread but I wan't able to get it to work, here's what I came up with

       

      WHERE Interfaces.NodeID = ${NodeID} AND LastSeen <= ADDDAY(-180,GetDate())

       

      I get "There was an error processing the request." when I try to run it. I would love any advice you guys can give, thanks.