8 Replies Latest reply on Aug 27, 2015 11:33 AM by davfost@microsoft.com

    Is there a way to programmatically suppress all alerts for a target device during a maintenance window?

    davfost@microsoft.com

      Is there a way to programmatically suppress all alerts for a target device during a maintenance window?

       

      We currently have several monitoring environments and we have developed a unified tool to suppress alerts during maintenance operations like patching and planning outages for system upgrades. We are looking to add solarwinds to this tool using the Orion SDK, but so far I have only been able to find examples of alert suppression using the UI. Is there a way to perform alert suppression for a target device using the SDK?

        • Re: Is there a way to programmatically suppress all alerts for a target device during a maintenance window?
          tdanner

          Yes. You can use the Orion.Nodes.Unmanage verb to do this. In PowerShell it looks like this:

           

          $swis = Connect-Swis ... # your connection details here  
          $nodeId = 123 # Get the NodeID from somewhere, possibly a query
          $start = [DateTime]::UtcNow
          $end = $start.AddMinutes(30)
          Invoke-SwisVerb $swis Orion.Nodes Unmanage @($nodeId, $start, $end, $false)
          
          1 of 1 people found this helpful
          • Re: Is there a way to programmatically suppress all alerts for a target device during a maintenance window?
            rschroeder

            Would it fill your need for fewer alerts to use the Alert Suppression option based on Groups and Dependencies?

             

            I put the resources being monitored by NPM into a group and build a dependency for that group, and tie it to one resource.

             

            Example:  I have a site with 20 switches and a router, and I monitor the state of all the devices with NPM.  I know there's no need to get 21 alerts when the WAN or router fails.  So I built a dependency in NPM, created a group with all the switches in it, and defined that group as being dependent on the router.

             

            This way I get only one alert that the router is down.

             

            The unreachable devices go yellow, then red, then to an X icon when they become unavailable, and I only get one notification.

             

            But I can still see which devices are unavailable through the dependency since they show as down with an X through their icons.

             

            Better still, if only some switches come back up (let's say their power stayed down when the router's power was restored) their alerts are no longer suppressed; I see them as down and I get alerts for them.  That keeps me from assuming everything came back up once the router was available again.

             

            If you'd like more detail, with screen shots on how to build this, please let me know.

             

            Swift packets!

             

            Rick S.