[svlug] Getting local access to SNMP traps / Debian 3.0

Tim Flagg timf at linuxmigration.com
Fri Oct 31 10:55:20 PST 2003

> My customer needs to get access locally and programatically (API's) to those
> traps, both the time at which it is generated and the trap information. By
> "locally", I mean that the customer wants to access such information from an
> application running  at the same host where the "agent" that generates the
> traps does.

A couple of choices are:
    1) pysnmp:  "SNMP framework for Python": at http://pysnmp.sf.net.
       I've used the pysnmp library in a product and it worked great.
       It includes the ability to receive and parse snmp traps, which you
       could use to make the trap information available to an application
       any way you'd like.

    2) The standard net-snmp software at http://www.net-snmp.org is
       included/available in most Linux distributions.  It also includes
       the ability to receive and parse traps (snmpdtrapd.c). I've used
       net-snmp in other products and it worked fine.

Then you just need to make sure the traps are sent to both the local
machine in addition to the remote machine(s).

If you have a choice, I'd go with pysnmp as the "glue" between traps and
the application needing the trap information:  Python is a great language.

Tim Flagg
Linux Migration, Inc.

More information about the svlug mailing list