I am using the PairWithWindow to parse and act on peering logs.  The 
logs are indicating syntax errors coming from the perl minicode used for 
checking context.  If this is truely perl, then why wouldn't   /pattern/ 
be a legal construct?  Do I need to wrap the context definition =($3 =~ 
/pattern/) in braces? eg ({$3 =~ /pattern/; }) ?

Please advise,
Tim Peiffer

Thu Aug 28 14:23:08 2008: BGP Peer Down  Severity: Critical Source: <BGP 
Host> (<Peer IP> / <Peer DNS>.) Details:
Thu Aug 28 14:23:08 2008: Error evaluating code '<Peer DNS> =~ 
/<provider1>|<provider2>/i': syntax error at (eval 64) line 1, near ". =~"

# Use the augmented event above as part of the pair.
#
# Commercial peers have a higer availability expectation.  I am 
expecting them
# to be down for less than a minute or notify
#
type=PairWithWindow
ptype=RegExp
pattern=BGP Peer Down\s+Severity: \S+ Source: (\S+) \((\S+) \/ (\S+)\) 
Details: (.*)
desc=FEED BGP Peer Down $1 to $3
context= =($3 =~ /<provider1>|<provider2>/i)
action=logonly %s sending page ; \
    pipe 'BGP Peer down $1 to $2/$3' /usr/bin/mail <page destination>
ptype2=RegExp
pattern2=BGP Peer Established Severity: \S+ Source: (\S+) \(peer to 
(\S+)\) Details: (.*)
desc2=FEED BGP Peer bounced link $1 to $2
action2=logonly %s
window=60



-- 
Tim Peiffer
Network Support Engineer
Office of Information Technology
University of Minnesota/NorthernLights GigaPOP


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Simple-evcorr-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/simple-evcorr-users

Reply via email to