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.

Alert on table row exists

I have a table at OID 1.3.6.1.4.1.2620.500.9002.1

I want to be able to alert when a row is removed from the table, is this possible?

So for instance, trigger alert if row containing X value, does not exist.

  • Bit rubbish this community thing isn’t it!
    Lazy money saving vendor trying to make their customers do the work, not even a moderator to assist and keep things ticking along it seems.
  • This isn't a common request that many people would have experience with, and those of us that would may miss the thread or don't have the time to respond outside of their actual day jobs..

    That said, here is a starting point without having access to your system or knowing the entire use case. You'll most likely need to customise the below based on the OID values, etc.

    1. Create a new alert with type Custom SWQL Alert with a Node condition.

    I am using a node condition assuming you are using a node poller and want to know which node is missing a row in that UnDP. If I used the Custom Table Poller Current Status condition, it alerted on every single row that didn't match.

     

    shuth_0-1595659658598.png

     
     
     
     
     

    2. The alert will prefill the initial SELECT line but you can add the remaining query into the text box:

    SELECT Nodes.Uri, Nodes.DisplayName FROM Orion.Nodes AS Nodes
    
    -- copy from here --
    
    WHERE NodeID NOT IN 
    (
     SELECT DISTINCT NodeID
    FROM Orion.NPM.CustomPollerStatusOnNodeTabular
    WHERE CustomPollerStatusOnNodeTabular.CustomPollerAssignment.CustomPollerName = 'CUSTOMPOLLERNAME'
    AND Status = 'THE_VALUE_YOU_WANT_TO_ALARM_ON'
    )
    AND Nodes.CustomPollerAssignmentOnNode.CustomPollerName = 'CUSTOMPOLLERNAME'
     
     
     

    It works in a bit of reverse logic. It looks for all the nodes that have that custom poller assigned and has that value. It then feeds that list to the outer SELECT query excluding those nodes.

    If you don't want to use the CustomPollerName you can use the OID by replacing CustomPollerName with CustomPollerOID and then inputting the OID instead of the UnDP name.

    e.g.

    WHERE CustomPollerStatusOnNodeTabular.CustomPollerAssignment.CustomPollerOID = '1.3.6.1.4.1.2620.500.9002.1'

    3. I haven't fulled looked into the reset condition. You might be able to use "when trigger condition is no longer true", or use the same custom query but with "WHERE NodeID IN" instead of NOT IN, or you may need to rewrite the entire query...

    That should get you started. I recommend downloading the SolarWinds SDK and using the SWQL Studio to test your queries.

    https://github.com/solarwinds/OrionSDK/releases