Just right a condition rule which allows you to parse the varbind string for 
what your looking for. It's a lot easier to setup then is sounds..here's some 
code that's similar. I have one (1) varbind that passes like 15 different 
values....here's what I did:

0xfff00015 E 0 R CA.EventCondition, "(regexp({v 1}, {S \"Cleared:Load On 
Battery  \"}))" , "0xfff00017 -:-","(regexp({v 1}, {S \"Cleared:Bad Input 
Frequency\"}))"                                                                 
             , "0xfff00000 -:-","(regexp({v 1}, {S \"Cleared:Bypass Input 
Voltage/Frequency Fault\"}))" , "0xfff00000 -:-","(regexp({v 1}, {S 
\"Cleared:Load On Battery\"}))                                                  
                           " , "0xfff00018 -:-","(regexp({v 1}, {S 
\"Cleared:Battery Test Failed\"}))" , "0xfff00019 -:-","(regexp({v 1}, {S 
\"Cleared:Load On Bypass\"}))" , "0xfff0001a -:-","(regexp({v 1}, {S \"Cleared: 
Battery Test Failed\"}))" , "0xfff0001b -:-","(regexp({v 1}, {S \"Cleared:Low 
Battery\"}))" , "0xfff0001c -:-","(regexp({v 1},{S \"Cleared:Input Under 
Voltage\"}))" , "0xfff0001f -:-","(regexp({v 1}, {S \"System Return to 
Normal\"}))" , "0xfff00020 -:-","(regexp({v 1}, {S \"Cleared:Input Over 
Voltage\"}))" , "0xfff00029 -:-"


The "v 1" is the varbind that passess all these different values we need to 
serach for our autoclears. Once a match is made is generares a uniuque alarm 
who's sole purpose is to clear the outstanding corresponding alarm. For 
debugging purposes any time this varbind is sent I have a generic event that 
passes the info in the trap in case I receive a new varbind value I have never 
seen.


HTH...

Andy


From: Cutting, Jeremiah [mailto:[email protected]]
Sent: Friday, July 29, 2011 1:51 PM
To: spectrum
Subject: [spectrum] help with clearing trap

Running Spectrum 9.1.  I need some help with figuring out how to create a 
clearing event for an alarm.  I have two traps (separate oids) from a device, 
an up and a down trap.  Each trap contains two varbinds, one of which is 
useable to clear the down trap (the other just contains the device IP).  The 
problem is that the string in the varbinds don't quite match.  So for example:

DOWN trap
Varbind1 = blahblahblah_DOWN

UP trap
Varbind1 = blahblahblah_UP

The blahblahblah always matches, it's just the addition of _UP and _DOWN that 
is different.  So setting up a simple clear won't work, and I can't have the UP 
alarm clear all alarms for the device because of the nature of the alarm.  Any 
suggestions?

Thanks,
Jeremiah

  *   --To unsubscribe from spectrum, send email to 
[email protected]<mailto:[email protected]> with the body: unsubscribe spectrum 
[email protected]

---
To unsubscribe from spectrum, send email to [email protected] with the body: 
unsubscribe spectrum [email protected]

Reply via email to