1 Reply Latest reply on Jan 27, 2017 2:02 PM by tdanner

    Mark an interface as "Display interface as unplugged rather than down"

    Chet Camlin

      Hi all.

       

      I have a requirement to mark an access port as "Display interface as unplugged rather than down" using an alert. This is the logic.

       

      A port on a access switch goes down because the user turned off their PC.

       

      1. Is the port marked as access or trunk? ( I have this query configured)

      2. Fire off an alert that posts to the SolarWinds event log and sets the interface property "Display interface as unplugged rather than down" if it's not set.

       

      This will enable us to save days to weeks of time evaluating thousands of ports.

       

      So basically I need to feed the interface name variable to a power shell script that changes a setting in NPM.

       

      Thanks.

      Chet

        • Re: Mark an interface as "Display interface as unplugged rather than down"
          tdanner

          This should be pretty straightforward.

           

          # Open a connection to SWIS
          $swis = Connect-Swis -Hostname myorionserver.mydomain -Username mickeymouse -Password minnie
          
          # Get a list of Uris for the interfaces you want to change
          $uris = Get-SwisData $swis "SELECT Uri FROM Orion.NPM.Interfaces WHERE my-filter-expression"
          
          # Set the "Unpluggable" property to true on those interfaces
          $uris | Set-SwisData $swis @{Unpluggable=$true}
          

           

          If some of these interfaces are currently Down, their status will not change from Down to Unplugged until their next polling interval.