3 Replies Latest reply on Jun 9, 2017 6:10 PM by sum_giais

    UnDP get difference beetwean current and previous value


      Hi all,


      Anybody help me please.


      I need create UnDP that show me value as difference beetwean current and previous.

      Current value is a counter and always grows.

      I need to know moments when this counter grows fast.

      Using only counter has low visability because hard to see moment of grows and this counter has very big value

        • Re: UnDP get difference beetwean current and previous value

          This query below will find any UnDP with recent statistics and compare the difference to see if it has a greater than 200 numeric difference (pos or neg) for example. I imagine that would have to change for you to accommodate your UnDP values you're specifically alerting on. Also you may need to add a statement to only alert on a specific UnDP you want, which would be better fitted into the second inner join so you're limiting your scope.


          With custom SQL variables you can actually use OFFSET and FETCH to ensure you're getting the most recent value only, but that can't be used in an alert.


          Do note that, this can be tricky, and you should ALWAYS test this in sql management studio to ensure you're getting results you expect before implementing any alerts.


          ################################# Note the first line SELECT is always pre-populated by the alert if you're creating one, so no need to copy it into the custom SQL alert window.


          SELECT Nodes.Caption, Nodes.NodeID FROM Nodes

          inner join CustomPollerAssignmentView undp on Nodes.NodeID = undp.NodeID /* Join in your UnDP assignments */

          inner join CustomPollerStatistics_Detail stats on /* Join in your UnDP statistics */


            undp.CustomPollerAssignmentID = stats.CustomPollerAssignmentID

            and datediff(minute, stats.DateTime, getutcdate()) > 9 /* Only join in your UnDP stats older than 9 minutes */

            and datediff(minute, stats.DateTime, getutcdate()) < 21 /* and newer than 21 minutes - this should be adjusted based on your polling intervals */




            undp.CurrentValue - stats.RawStatus > 200

            OR undp.CurrentValue - stats.RawStatus < -200


          • Re: UnDP get difference beetwean current and previous value

            In the UNDP tool on the server you can edit the poller and under advanced options change the value type from rate to counter.  It will automatically show as the difference between the current and previous polled value



            2 of 2 people found this helpful