2 Replies Latest reply on Oct 23, 2017 2:38 AM by nwsvlkco

    Create a report for Planned Maintenance Window

    XM07535

      I've searched the forums and SolarWinds knowledgebase and I can't find the answer.  I currently use a SQL query to get unmanaged nodes, but it only partially works.  I need to know when nodes are planned in the future. 

      Here's the query I used:

       

      SELECT

      n.caption as Node

      , '/Orion/NetPerfMon/NodeDetails.aspx?NetObject=N%3a' + ToString(n.nodeid) AS [_LinkFor_Node]

      , '/Orion/images/StatusIcons/Small-' + n.StatusLED AS [_IconFor_Node]

      , unmanaged

      , tolocal(UnManageFrom) as Unmanage

      , daydiff(getutcdate(), UnManagefrom)as [Days till Unmanage]

      , tolocal(UnManageUntil) as Remanage

      , daydiff(getutcdate(), UnManageuntil)as [Days until Remanage]

      FROM Orion.Nodes n

      where

      (

      unmanaged = 'true' and

      (minutediff(getutcdate(), UnManagefrom) > -10080)

      )

      or

      (

      minutediff(getutcdate(), UnManagefrom) >0

      and minutediff(getutcdate(), UnManagefrom) <10080

      )

      order by unmanagefrom

       

       

      I can't get this to work 100%.  I have no experience working with SQL queries so I don't know what I need to modify.  I tried to create a new report and search for the System Property for Planned Maintenance Window.  When I look at Manage Nodes I see devices that I've unmanaged in the future, but they don't show up in my query. 

       

      Either I create a new report using Planned Maintenance Window or fix my SQL query.  I just want to know every device I have unmanaged.

        • Re: Create a report for Planned Maintenance Window
          XM07535

          FIXED.  I messed around and rolled the dice with the select statements until I didn't get an error. 

           

          SELECT

          n.caption as Node

          , '/Orion/NetPerfMon/NodeDetails.aspx?NetObject=N%3a' + ToString(n.nodeid) AS [_LinkFor_Node]

          , '/Orion/images/StatusIcons/Small-' + n.StatusLED AS [_IconFor_Node]

          , unmanaged

          , tolocal(UnManageFrom) as Unmanage

          , daydiff(getutcdate(), UnManagefrom)as [Days till Unmanage]

          , tolocal(UnManageUntil) as Remanage

          , daydiff(getutcdate(), UnManageuntil)as [Days until Remanage]

          FROM Orion.Nodes n

          where

          (

          unmanaged = 'true' and

          (minutediff(getutcdate(), UnManagefrom) > 0)

          )

          or

          (

          minutediff(getutcdate(), UnManagefrom) >0

          and minutediff(getutcdate(), UnManagefrom) <999999

          )

          order by unmanagefrom