Showing results for 
Search instead for 
Did you mean: 
Create Post
Level 7

Create an alert for a SNMP trap received in Trap Viewer

I need to create an alert for the trap which contains the text "M3 Grid PRD" in trap details. There is no reset trap received. The traps received from this server contains only the problem with the text M3 Grid PRD. I have tried to create alert with color code only by editing your SQL query mentioned in this article, but I guess I am missing something. Please find below the SQL query I have entered in trigger condition.

where NodeID in

(SELECT a.NodeID FROM traps a with (nolock) where colorcode=33023 and acknowledged=0



Also, please let me know the varbind value which should I use in the alert.

We have also integrated Service Now in our SolarWinds console. Is there any way to get the trap details in the description of ticket generated from solarwinds when the alert gets triggered so that we can know for which issue this ticket has been generated.

RichardLetts​ Please provide me correct SQL query for my issue

0 Kudos
9 Replies
Level 16

Personally, I'd be using the SNMP trap received to search the trap for the string you want to alert on and setting the color there; going this in the alert manager requires substringing (which means it has to non-index scan all of the data in the table rather than doing an index-scan looking for an integer value)

I've no idea what you use for the reset of this alert -- manually cleared or using the 'acknowledged' flag (set when you 'acknowledge/clear a trap on the SNMPtrap message widget)

for how to extract the values look at this posting: Traps to Alert Conversion using custom SQL queries

while I don't mind being invoked to help, in this case you're going to have to start playing around with the Database Manager and running test SQL queries against the solarwinds database (or the SWQL manager and using SWQLwhich isn't quite as flexible). It's really hard for me to be much help when I don't have your data.


0 Kudos

Hi Richard,

Could you please help me to know correct varbind so that I can tag the trap?

0 Kudos

This will take a small amount of testing, try ${VbData2} and see which value is returned. (they Varbinds are displayed in the order received.)

Alternatively read Traps to Alert Conversion using custom SQL queries  for how to do this without using tags

0 Kudos

Thanks Richard for your response !!

I am not good at SQL queries and I need to create an alert for the trap which contains the text "M3 Grid PRD" in trap details. I have already pasted the trap details in the screenshot above. Could you please help me out in generating the correct SQL query or guide me to create such alert?

0 Kudos

I'm going to suggest you spend some time learning SQL. It will not be wasted.

Understanding that databases are behind almost every application today helps you understand how and why they work.

Without the actual data in a sqldatabase I can't write the SQL: I write what I think the query is, I test it against actual data, I make it work, I profile the query, I optimise it. None of these steps after the first one work without having the actual data in a table to query, and I avoid giving people untested solutions to problems.

0 Kudos

you can tag the incoming trap and then alert based on that using SQL query...

or if email option is there then u can also put trigger action in trap viewer....

0 Kudos

How to tag the incoming trap? Please check the screenshot of incoming trap in my original post and help me to tag the trap correctly.

0 Kudos

just like how you are using other actions for email and color, you also have option to tag the trap which means u can give some text and value will be shown for the tagged traps...

0 Kudos

I have already put email action in trap viewer, but didn't find alert action there.

0 Kudos