Background: We are an organization that wears many hats. We serve as a 
University backbone operator, an exchange point operator, and an 
interconnect provider for Commodity Internet and various research 
internets to City, County, State, K12, and Higher Ed institutions in the 
region.  We have connections with multiple transit providers, content 
providers, and research network peers.  As you can imagine, we have a 
number of peering contacts as a result.

I am looking for a better way to do contact automation.  I have what 
looks to be an interesting mouse-trap that works.  However the 
configuration looks a bit cumbersome and I wanted to have some input on 
how to do the task of contact automation better.

Given a log line that contains a legal IPv4 or IPv6 address as a Peer IP 
address in the log string, I wish to use the Peer IP as input to 
determine the class of peer it is, period of time to call a peer down or 
flapping (PairWith2Thresholds), a contact group, and a set of epage or 
email addresses for contact.  I would imagine this could be expanded to 
any number of facilities, but email based contact is sufficient for now.

Is there a better way to go about this task?  Comments, suggestions?

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

type=Single
ptype=RegExp
desc=test of context eval
pattern=testing (\S+)
action= eval %PeerDNS ( \
        my $line = `grep "^$1=" peerlist.txt`; \
        chomp($line); \
        if ($line =~ /\S+=(\S+),(\S+)/) { "$$1" } else { "$1" } \
      ); \
      eval %PeerClass ( \
        my $line = `grep "^$1=" peerlist.txt`; \
        chomp($line); \
        if ($line =~ /\S+=(\S+),(\S+)/) { "$$2" } else { "$1" } \
      ); \
      eval %FlapResponse ( \
        my $line = `grep "^%PeerClass=" peer2response.txt`; \
        chomp($line); \
        if ($line =~ /\S+=(\S+),(\S+)/) { "$$1" } else { "$1" } \
      ); \
      eval %ContactGroup ( \
        my $line = `grep "^%PeerClass=" peer2response.txt`; \
        chomp($line); \
        if ($line =~ /\S+=(\S+),(\S+)/) { "$$2" } else { "$1" } \
      ); \
      eval %ContactList ( \
        my $line = `grep "^%ContactGroup=" contact.txt`; \
        chomp($line); \
        if ($line =~ /\S+=(\S+)/) { "$$1" } else { "$1" } \
      ); \
      logonly PeerIP $1 PeerDNS name %PeerDNS flap control %FlapResponse 
seconds contact %ContactList

./peerlist.txt
# PeerIP=Peer Name,PEER Class
1.2.3.4=bigprovider.com,COMMERCIAL-TRANSIT-PROVIDER
2001:468:1900:ffff:f=RE-BACKBONE.net,RE-BACKBONE
./peer2response.txt
# PEER Class=Flap Response, Contact Group
RE-BACKBONE=300,ONCALL
COMMERCIAL-TRANSIT-PROVIDER=300,ONCALL
./contact.txt:
#key=value
[EMAIL PROTECTED]

[mybox ~]$ sec.pl -conf=./sec.cfg -input=- -log=- -debug=5
SEC (Simple Event Correlator) 2.4.1
Fri Aug 29 19:40:57 2008: SEC (Simple Event Correlator) 2.4.1
Reading configuration from ./sec.cfg
Fri Aug 29 19:40:57 2008: Reading configuration from ./sec.cfg
testing 1.2.3.4
PeerIP 1.2.3.4 PeerDNS name bigprovider.com flap control 300 seconds 
contact [EMAIL PROTECTED]
Fri Aug 29 19:41:14 2008: PeerIP 1.2.3.4 PeerDNS name bigprovider.com 
flap control 300 seconds contact [EMAIL PROTECTED]
testing 2001:468:1900:ffff:f
PeerIP 2001:468:1900:ffff:f PeerDNS name RE-BACKBONE.net flap control 
300 seconds contact [EMAIL PROTECTED]
Fri Aug 29 19:41:19 2008: PeerIP 2001:468:1900:ffff:f PeerDNS name 
RE-BACKBONE.net flap control 300 seconds contact [EMAIL PROTECTED]


-------------------------------------------------------------------------
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