2 Replies Latest reply on Mar 31, 2017 8:26 AM by nick_scott

    Auto Ignoring Discovered Volumes and Discovered Interfaces


      Very soon I will have thousands and thousands of interfaces and volumes that need ignoring.  I do not have the patience or time to mark each of these as "ignored"


      I had success in my QA environment implementing the queries found here Re: Automatically ignore volume/interface types that are discovered via Network Sonar Discovery.   After speaking with some SR Thwack members it was determined that this was not optimal and the API should be used. 


      To keep things simple, I want to focus on loopback interfaces.   We have no need for them, therefore auto-ignoring makes sense.   Within SWQL Studio, I noticed that the Orion.NPM.DiscoveredInterfaces does not have a Uri value.  I was hoping this would be as simple as selecting the URI and setting a ignore value to true.  This is not the case, and I cannot determine how an interface goes from discovered to ignored.  Below I have the script returning the DiscoveredInterfaceID, and the InterfaceName.  The script returns the expected objects, just not sure how to get these objects added to the Orion.DiscoveryIgnoredInterfaces table...


      $ErrorActionPreference = 'Stop'

      Add-PSSnapin SwisSnapin

      $hostname = 'X'
      $username = 'X'
      $password = 'X'

      $swis = Connect-Swis -Hostname $hostname -Username $username -Password $password

      $uris = Get-SwisData $swis "SELECT DiscoveredInterfaceID, InterfaceName FROM Orion.NPM.DiscoveredInterfaces DI WHERE DI.InterfaceName LIKE '%lo%'"



      -------------------------Return Values------------------------------


      DiscoveredInterfaceID InterfaceName                                                                                                             

                                                                                                             --------------------- -------------                                                                                                             

                                                                                                                                14 lo                                                                                                                        

                                                                                                                                16 lo                                                                                                                        

                                                                                                                                18 lo                                                                                                                        

                                                                                                                                20 lo                                                                                                                        

                                                                                                                                22 lo  


      I would have to imagine that anyone with a decent sized environment would need something like this working.   When I say I have thousands of interfaces, I am talking about 5000+ interfaces