This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

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

  • 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 */

    )

    where

    (

      undp.CurrentValue - stats.RawStatus > 200

      OR undp.CurrentValue - stats.RawStatus < -200

    )

  • 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

    https://thwack.solarwinds.com/thread/19684#50453

  • Kudos! Now I'm thinking 'doh!' Much better for what bardeev is looking for. I've had to unfortunately use the queries to reference historical values.

  • This query resolved my challenge with monitoring HA status changes in Palo Alto.

    Thank you!