Skip navigation
964 Views 0 Replies Latest reply: Jul 10, 2012 8:34 AM by Michael Ducharme RSS
Michael Ducharme Rank: White Belt 24 posts since
Jul 20, 2010
Currently Being Moderated

Jul 10, 2012 8:34 AM

Transform to include MIB Description for SNMP trap

If you would like to include the description for an SNMP trap from the MIB by default, the following transform appears to work:

 

In Events->Unknown->Transform, add the following:

 

if evt.summary.startswith("snmp trap "):

   oid = getattr(evt, 'oid', None)

   if oid:

      for brain in [ b for b in dmd.Mibs.mibSearch() if b.oid]:

           if brain.oid == oid:

              description = brain.getObject().description

              evt.message = evt.message + ": " + description

              evt.summary = evt.message

              break

More Like This

  • Retrieving data ...

Legend

  • Correct Answers - 4 points
  • Helpful Answers - 2 points