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.

How to create an Advanced Alert from a SNMP Trap using the original SNMP Receiver

We are on version 2020.2.6 but never upgraded our Log Viewer so still using the original version that you need to run from the Orion Server via an RDP session. We had the need to create a complex alert condition: if Node A is down and Node B is down and a specific SNMP Trap was received the alert would trigger. 

This all requires the use of the Advanced Alerting Engine. In order to do so the node up/down alerts were created in the normal manner but the SNMP Trap portion of the alert needed to be done via an advanced SQL Query. Below is a screenshot of the query. Hope this helps if anyone else runs into a situation where you need to use SNMP Traps with the Advanced Alerting Engine.

Here is the cut/paste friendly part:

INNER JOIN Traps

ON Nodes.NodeID = Traps.NodeID

INNER JOIN TrapVarbinds
ON Traps.trapid = Trapvarbinds.trapid

--remove this line. your search string goes into the line below
AND (Trapvarbinds.OidValue LIKE '%YourSearchStringHere%')
--remove this line. minute below goes back 9 minutes in this example, adjust to your needs
AND Traps.DateTime>Dateadd(MINUTE, -9, SYSDATETIME())